summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-02-26 15:38:39 +0000
committerschwarze <>2018-02-26 15:38:39 +0000
commita29e14c7376d40d3e949149067671f080842a220 (patch)
treec2d67f6ff03a1bc35fee5cface57766309142921
parentb7e9ca652e283beea6335188d22d1480dfe65a7c (diff)
downloadopenbsd-a29e14c7376d40d3e949149067671f080842a220.tar.gz
openbsd-a29e14c7376d40d3e949149067671f080842a220.tar.bz2
openbsd-a29e14c7376d40d3e949149067671f080842a220.zip
In x509.h rev. 1.41 2018/02/22 17:22:02, jsing@ provided
X509_chain_up_ref(3). Merge the documentation from OpenSSL, tweaked by me.
-rw-r--r--src/lib/libcrypto/man/X509_new.337
1 files changed, 31 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/X509_new.3 b/src/lib/libcrypto/man/X509_new.3
index dbf82bc974..2648a609f9 100644
--- a/src/lib/libcrypto/man/X509_new.3
+++ b/src/lib/libcrypto/man/X509_new.3
@@ -1,8 +1,9 @@
1.\" $OpenBSD: X509_new.3,v 1.10 2016/12/25 22:15:10 schwarze Exp $ 1.\" $OpenBSD: X509_new.3,v 1.11 2018/02/26 15:38:39 schwarze Exp $
2.\" OpenSSL 3a59ad98 Dec 11 00:36:06 2015 +0000 2.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2002, 2006, 2015 The OpenSSL Project. All rights reserved. 5.\" Copyright (c) 2002, 2006, 2015, 2016 The OpenSSL Project.
6.\" All rights reserved.
6.\" 7.\"
7.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
@@ -48,13 +49,14 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 51.\"
51.Dd $Mdocdate: December 25 2016 $ 52.Dd $Mdocdate: February 26 2018 $
52.Dt X509_NEW 3 53.Dt X509_NEW 3
53.Os 54.Os
54.Sh NAME 55.Sh NAME
55.Nm X509_new , 56.Nm X509_new ,
56.Nm X509_free , 57.Nm X509_free ,
57.Nm X509_up_ref 58.Nm X509_up_ref ,
59.Nm X509_chain_up_ref
58.Nd X.509 certificate object 60.Nd X.509 certificate object
59.Sh SYNOPSIS 61.Sh SYNOPSIS
60.In openssl/x509.h 62.In openssl/x509.h
@@ -68,6 +70,10 @@
68.Fo X509_up_ref 70.Fo X509_up_ref
69.Fa "X509 *a" 71.Fa "X509 *a"
70.Fc 72.Fc
73.Ft STACK_OF(X509) *
74.Fo X509_chain_up_ref
75.Fa "STACK_OF(X509) *chain"
76.Fc
71.Sh DESCRIPTION 77.Sh DESCRIPTION
72.Fn X509_new 78.Fn X509_new
73allocates and initializes an empty 79allocates and initializes an empty
@@ -93,12 +99,24 @@ pointer, no action occurs.
93.Pp 99.Pp
94.Fn X509_up_ref 100.Fn X509_up_ref
95increments the reference count of 101increments the reference count of
96.Fa a . 102.Fa a
103by 1.
97This function is useful if a certificate structure is being used 104This function is useful if a certificate structure is being used
98by several different operations each of which will free it up after 105by several different operations each of which will free it up after
99use: this avoids the need to duplicate the entire certificate 106use: this avoids the need to duplicate the entire certificate
100structure. 107structure.
101.Pp 108.Pp
109.Fn X509_chain_up_ref
110performs a shallow copy of the given
111.Fa chain
112using
113.Fn sk_X509_dup
114and increments the reference count of each contained certificate
115by 1.
116Its purpose is similar to
117.Fn X509_up_ref :
118The returned chain persists after the original is freed.
119.Pp
102The object 120The object
103.Vt X509_INFO , 121.Vt X509_INFO ,
104which can hold a certificate, the corresponding private key, 122which can hold a certificate, the corresponding private key,
@@ -114,6 +132,13 @@ Otherwise it returns a pointer to the newly allocated structure.
114.Pp 132.Pp
115.Fn X509_up_ref 133.Fn X509_up_ref
116returns 1 for success or 0 for failure. 134returns 1 for success or 0 for failure.
135.Pp
136.Fn X509_chain_up_ref
137returns the copy of the
138.Fa chain
139or
140.Dv NULL
141if an error occurs.
117.Sh SEE ALSO 142.Sh SEE ALSO
118.Xr AUTHORITY_KEYID_new 3 , 143.Xr AUTHORITY_KEYID_new 3 ,
119.Xr BASIC_CONSTRAINTS_new 3 , 144.Xr BASIC_CONSTRAINTS_new 3 ,