diff options
author | schwarze <> | 2021-06-30 10:06:43 +0000 |
---|---|---|
committer | schwarze <> | 2021-06-30 10:06:43 +0000 |
commit | 3cdac1818a4ed4bf937ad8d44b26bdf7ab8fd4e4 (patch) | |
tree | b80a3ea6897fc95db0f969409c3be920ad31f643 /src | |
parent | 518e15603ba5e5b01dd2c19f42d555ef66903191 (diff) | |
download | openbsd-3cdac1818a4ed4bf937ad8d44b26bdf7ab8fd4e4.tar.gz openbsd-3cdac1818a4ed4bf937ad8d44b26bdf7ab8fd4e4.tar.bz2 openbsd-3cdac1818a4ed4bf937ad8d44b26bdf7ab8fd4e4.zip |
document and deprecate the macros X509_extract_key(3)
and X509_REQ_extract_key(3), using feedback from tb@ and jsing@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/X509_get_pubkey.3 | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/X509_get_pubkey.3 b/src/lib/libcrypto/man/X509_get_pubkey.3 index ad9c1ab0f5..dc1f6a99b4 100644 --- a/src/lib/libcrypto/man/X509_get_pubkey.3 +++ b/src/lib/libcrypto/man/X509_get_pubkey.3 | |||
@@ -1,11 +1,11 @@ | |||
1 | .\" $OpenBSD: X509_get_pubkey.3,v 1.8 2020/06/19 14:31:29 schwarze Exp $ | 1 | .\" $OpenBSD: X509_get_pubkey.3,v 1.9 2021/06/30 10:06:43 schwarze Exp $ |
2 | .\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
3 | .\" X509_REQ_get0_pubkey and X509_REQ_get_X509_PUBKEY not yet in LibreSSL | 3 | .\" X509_REQ_get0_pubkey and X509_REQ_get_X509_PUBKEY not yet in LibreSSL |
4 | .\" | 4 | .\" |
5 | .\" This file is a derived work. | 5 | .\" This file is a derived work. |
6 | .\" The changes are covered by the following Copyright and license: | 6 | .\" The changes are covered by the following Copyright and license: |
7 | .\" | 7 | .\" |
8 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | 8 | .\" Copyright (c) 2020, 2021 Ingo Schwarze <schwarze@openbsd.org> |
9 | .\" | 9 | .\" |
10 | .\" Permission to use, copy, modify, and distribute this software for any | 10 | .\" Permission to use, copy, modify, and distribute this software for any |
11 | .\" purpose with or without fee is hereby granted, provided that the above | 11 | .\" purpose with or without fee is hereby granted, provided that the above |
@@ -66,7 +66,7 @@ | |||
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: June 19 2020 $ | 69 | .Dd $Mdocdate: June 30 2021 $ |
70 | .Dt X509_GET_PUBKEY 3 | 70 | .Dt X509_GET_PUBKEY 3 |
71 | .Os | 71 | .Os |
72 | .Sh NAME | 72 | .Sh NAME |
@@ -76,7 +76,9 @@ | |||
76 | .Nm X509_get_X509_PUBKEY , | 76 | .Nm X509_get_X509_PUBKEY , |
77 | .Nm X509_get0_pubkey_bitstr , | 77 | .Nm X509_get0_pubkey_bitstr , |
78 | .Nm X509_REQ_get_pubkey , | 78 | .Nm X509_REQ_get_pubkey , |
79 | .Nm X509_REQ_set_pubkey | 79 | .Nm X509_REQ_set_pubkey , |
80 | .Nm X509_extract_key , | ||
81 | .Nm X509_REQ_extract_key | ||
80 | .Nd get or set certificate or certificate request public key | 82 | .Nd get or set certificate or certificate request public key |
81 | .Sh SYNOPSIS | 83 | .Sh SYNOPSIS |
82 | .In openssl/x509.h | 84 | .In openssl/x509.h |
@@ -110,6 +112,14 @@ | |||
110 | .Fa "X509_REQ *x" | 112 | .Fa "X509_REQ *x" |
111 | .Fa "EVP_PKEY *pkey" | 113 | .Fa "EVP_PKEY *pkey" |
112 | .Fc | 114 | .Fc |
115 | .Ft EVP_PKEY * | ||
116 | .Fo X509_extract_key | ||
117 | .Fa "X509 *x" | ||
118 | .Fc | ||
119 | .Ft EVP_PKEY * | ||
120 | .Fo X509_REQ_extract_key | ||
121 | .Fa "X509_REQ *req" | ||
122 | .Fc | ||
113 | .Sh DESCRIPTION | 123 | .Sh DESCRIPTION |
114 | .Fn X509_get_pubkey | 124 | .Fn X509_get_pubkey |
115 | attempts to decode the public key for certificate | 125 | attempts to decode the public key for certificate |
@@ -158,13 +168,24 @@ The first time a public key is decoded, the | |||
158 | structure is cached in the certificate or certificate request itself. | 168 | structure is cached in the certificate or certificate request itself. |
159 | Subsequent calls return the cached structure with its reference count | 169 | Subsequent calls return the cached structure with its reference count |
160 | incremented to improve performance. | 170 | incremented to improve performance. |
171 | .Pp | ||
172 | .Fn X509_extract_key | ||
173 | and | ||
174 | .Fn X509_REQ_extract_key | ||
175 | are deprecated aliases for | ||
176 | .Fn X509_get_pubkey | ||
177 | and | ||
178 | .Fn X509_REQ_get_pubkey , | ||
179 | respectively, implemented as macros. | ||
161 | .Sh RETURN VALUES | 180 | .Sh RETURN VALUES |
162 | .Fn X509_get_pubkey , | 181 | .Fn X509_get_pubkey , |
163 | .Fn X509_get0_pubkey , | 182 | .Fn X509_get0_pubkey , |
164 | .Fn X509_get_X509_PUBKEY , | 183 | .Fn X509_get_X509_PUBKEY , |
165 | .Fn X509_get0_pubkey_bitstr , | 184 | .Fn X509_get0_pubkey_bitstr , |
185 | .Fn X509_REQ_get_pubkey , | ||
186 | .Fn X509_extract_key , | ||
166 | and | 187 | and |
167 | .Fn X509_REQ_get_pubkey | 188 | .Fn X509_REQ_extract_key |
168 | return a public key or | 189 | return a public key or |
169 | .Dv NULL | 190 | .Dv NULL |
170 | if an error occurred. | 191 | if an error occurred. |
@@ -185,8 +206,10 @@ the reason can be determined with | |||
185 | .Sh ERRORS | 206 | .Sh ERRORS |
186 | .Fn X509_get_pubkey , | 207 | .Fn X509_get_pubkey , |
187 | .Fn X509_get0_pubkey , | 208 | .Fn X509_get0_pubkey , |
209 | .Fn X509_REQ_get_pubkey , | ||
210 | .Fn X509_extract_key , | ||
188 | and | 211 | and |
189 | .Fn X509_REQ_get_pubkey | 212 | .Fn X509_REQ_extract_key |
190 | provide diagnostics as documented for | 213 | provide diagnostics as documented for |
191 | .Xr X509_PUBKEY_get 3 . | 214 | .Xr X509_PUBKEY_get 3 . |
192 | If | 215 | If |
@@ -239,6 +262,12 @@ section 4.1 Basic Certificate Fields | |||
239 | RFC 2986: PKCS #10: Certification Request Syntax Specification, | 262 | RFC 2986: PKCS #10: Certification Request Syntax Specification, |
240 | section 4.1 CertificationRequestInfo | 263 | section 4.1 CertificationRequestInfo |
241 | .Sh HISTORY | 264 | .Sh HISTORY |
265 | .Fn X509_extract_key | ||
266 | and | ||
267 | .Fn X509_REQ_extract_key | ||
268 | first appeared in SSLeay 0.5.1 but returned a pointer to an | ||
269 | .Vt RSA | ||
270 | object before SSLeay 0.6.0. | ||
242 | .Fn X509_get_pubkey , | 271 | .Fn X509_get_pubkey , |
243 | .Fn X509_set_pubkey , | 272 | .Fn X509_set_pubkey , |
244 | .Fn X509_REQ_get_pubkey , | 273 | .Fn X509_REQ_get_pubkey , |