diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/X509_new.3 | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/X509_new.3 b/src/lib/libcrypto/man/X509_new.3 index 198ace48d8..581c954c1a 100644 --- a/src/lib/libcrypto/man/X509_new.3 +++ b/src/lib/libcrypto/man/X509_new.3 | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | .\" $OpenBSD: X509_new.3,v 1.33 2021/10/27 11:24:47 schwarze Exp $ | 1 | .\" $OpenBSD: X509_new.3,v 1.34 2021/10/28 15:30:54 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 3 | .\" | 3 | .\" |
| 4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
| 5 | .\" The changes are covered by the following Copyright and license: | 5 | .\" The changes are covered by the following Copyright and license: |
| 6 | .\" | 6 | .\" |
| 7 | .\" Copyright (c) 2016, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org> | 7 | .\" Copyright (c) 2016, 2018, 2019, 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 8 | .\" | 8 | .\" |
| 9 | .\" Permission to use, copy, modify, and distribute this software for any | 9 | .\" Permission to use, copy, modify, and distribute this software for any |
| 10 | .\" purpose with or without fee is hereby granted, provided that the above | 10 | .\" purpose with or without fee is hereby granted, provided that the above |
| @@ -66,12 +66,13 @@ | |||
| 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 68 | .\" | 68 | .\" |
| 69 | .Dd $Mdocdate: October 27 2021 $ | 69 | .Dd $Mdocdate: October 28 2021 $ |
| 70 | .Dt X509_NEW 3 | 70 | .Dt X509_NEW 3 |
| 71 | .Os | 71 | .Os |
| 72 | .Sh NAME | 72 | .Sh NAME |
| 73 | .Nm X509_new , | 73 | .Nm X509_new , |
| 74 | .Nm X509_dup , | 74 | .Nm X509_dup , |
| 75 | .Nm X509_REQ_to_X509 , | ||
| 75 | .Nm X509_free , | 76 | .Nm X509_free , |
| 76 | .Nm X509_up_ref , | 77 | .Nm X509_up_ref , |
| 77 | .Nm X509_chain_up_ref | 78 | .Nm X509_chain_up_ref |
| @@ -84,6 +85,12 @@ | |||
| 84 | .Fo X509_dup | 85 | .Fo X509_dup |
| 85 | .Fa "X509 *a" | 86 | .Fa "X509 *a" |
| 86 | .Fc | 87 | .Fc |
| 88 | .Ft X509 * | ||
| 89 | .Fo X509_REQ_to_X509 | ||
| 90 | .Fa "X509_REQ *req" | ||
| 91 | .Fa "int days" | ||
| 92 | .Fa "EVP_PKEY *pkey" | ||
| 93 | .Fc | ||
| 87 | .Ft void | 94 | .Ft void |
| 88 | .Fo X509_free | 95 | .Fo X509_free |
| 89 | .Fa "X509 *a" | 96 | .Fa "X509 *a" |
| @@ -114,6 +121,27 @@ using | |||
| 114 | .Xr ASN1_item_dup 3 , | 121 | .Xr ASN1_item_dup 3 , |
| 115 | setting the reference count of the copy to 1. | 122 | setting the reference count of the copy to 1. |
| 116 | .Pp | 123 | .Pp |
| 124 | .Fn X509_REQ_to_X509 | ||
| 125 | allocates a new certificate object, copies the public key from | ||
| 126 | .Fa req | ||
| 127 | into it, copies the subject name of | ||
| 128 | .Fa req | ||
| 129 | to both the subject and issuer names of the new certificate, sets the | ||
| 130 | .Fa notBefore | ||
| 131 | field to the current time and the | ||
| 132 | .Fa notAfter | ||
| 133 | field to the given number of | ||
| 134 | .Fa days | ||
| 135 | in the future, and signs the new certificate with | ||
| 136 | .Xr X509_sign 3 | ||
| 137 | using | ||
| 138 | .Fa pkey | ||
| 139 | and the MD5 algorithm. | ||
| 140 | If | ||
| 141 | .Fa req | ||
| 142 | contains at least one attribute, | ||
| 143 | the version of the new certificate is set to 2. | ||
| 144 | .Pp | ||
| 117 | .Fn X509_free | 145 | .Fn X509_free |
| 118 | decrements the reference count of the | 146 | decrements the reference count of the |
| 119 | .Vt X509 | 147 | .Vt X509 |
| @@ -146,9 +174,10 @@ Its purpose is similar to | |||
| 146 | .Fn X509_up_ref : | 174 | .Fn X509_up_ref : |
| 147 | The returned chain persists after the original is freed. | 175 | The returned chain persists after the original is freed. |
| 148 | .Sh RETURN VALUES | 176 | .Sh RETURN VALUES |
| 149 | .Fn X509_new | 177 | .Fn X509_new , |
| 178 | .Fn X509_dup , | ||
| 150 | and | 179 | and |
| 151 | .Fn X509_dup | 180 | .Fn X509_REQ_to_X509 |
| 152 | return a pointer to the newly allocated object or | 181 | return a pointer to the newly allocated object or |
| 153 | .Dv NULL | 182 | .Dv NULL |
| 154 | if an error occurs; an error code can be obtained by | 183 | if an error occurs; an error code can be obtained by |
| @@ -217,9 +246,11 @@ Certificate Revocation List (CRL) Profile | |||
| 217 | .Fn X509_new | 246 | .Fn X509_new |
| 218 | and | 247 | and |
| 219 | .Fn X509_free | 248 | .Fn X509_free |
| 220 | appeared in SSLeay 0.4 or earlier. | 249 | appeared in SSLeay 0.4 or earlier, |
| 221 | .Fn X509_dup | 250 | .Fn X509_dup |
| 222 | first appeared in SSLeay 0.4.4. | 251 | in SSLeay 0.4.4, and |
| 252 | .Fn X509_REQ_to_X509 | ||
| 253 | in SSLeay 0.6.0 . | ||
| 223 | These functions have been available since | 254 | These functions have been available since |
| 224 | .Ox 2.4 . | 255 | .Ox 2.4 . |
| 225 | .Pp | 256 | .Pp |
