diff options
| author | schwarze <> | 2018-02-26 15:38:39 +0000 |
|---|---|---|
| committer | schwarze <> | 2018-02-26 15:38:39 +0000 |
| commit | d973d85f7589137ba12691069f7d3e50f13bfaff (patch) | |
| tree | c2d67f6ff03a1bc35fee5cface57766309142921 /src/lib/libc | |
| parent | d27cd419a5c9bc8388740159b9b974ab9094f044 (diff) | |
| download | openbsd-d973d85f7589137ba12691069f7d3e50f13bfaff.tar.gz openbsd-d973d85f7589137ba12691069f7d3e50f13bfaff.tar.bz2 openbsd-d973d85f7589137ba12691069f7d3e50f13bfaff.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.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/man/X509_new.3 | 37 |
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 |
| 73 | allocates and initializes an empty | 79 | allocates 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 |
| 95 | increments the reference count of | 101 | increments the reference count of |
| 96 | .Fa a . | 102 | .Fa a |
| 103 | by 1. | ||
| 97 | This function is useful if a certificate structure is being used | 104 | This function is useful if a certificate structure is being used |
| 98 | by several different operations each of which will free it up after | 105 | by several different operations each of which will free it up after |
| 99 | use: this avoids the need to duplicate the entire certificate | 106 | use: this avoids the need to duplicate the entire certificate |
| 100 | structure. | 107 | structure. |
| 101 | .Pp | 108 | .Pp |
| 109 | .Fn X509_chain_up_ref | ||
| 110 | performs a shallow copy of the given | ||
| 111 | .Fa chain | ||
| 112 | using | ||
| 113 | .Fn sk_X509_dup | ||
| 114 | and increments the reference count of each contained certificate | ||
| 115 | by 1. | ||
| 116 | Its purpose is similar to | ||
| 117 | .Fn X509_up_ref : | ||
| 118 | The returned chain persists after the original is freed. | ||
| 119 | .Pp | ||
| 102 | The object | 120 | The object |
| 103 | .Vt X509_INFO , | 121 | .Vt X509_INFO , |
| 104 | which can hold a certificate, the corresponding private key, | 122 | which 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 |
| 116 | returns 1 for success or 0 for failure. | 134 | returns 1 for success or 0 for failure. |
| 135 | .Pp | ||
| 136 | .Fn X509_chain_up_ref | ||
| 137 | returns the copy of the | ||
| 138 | .Fa chain | ||
| 139 | or | ||
| 140 | .Dv NULL | ||
| 141 | if 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 , |
