diff options
| author | schwarze <> | 2021-10-26 10:01:23 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-10-26 10:01:23 +0000 |
| commit | 7e8af6dc63219139e59960024cc8b08ff3b52406 (patch) | |
| tree | 7341c2387ffc39642e2363af1cc20510a90cd863 /src/lib/libcrypto/man | |
| parent | 114b306ace8b6d5ccf69c334419f3f4327c94656 (diff) | |
| download | openbsd-7e8af6dc63219139e59960024cc8b08ff3b52406.tar.gz openbsd-7e8af6dc63219139e59960024cc8b08ff3b52406.tar.bz2 openbsd-7e8af6dc63219139e59960024cc8b08ff3b52406.zip | |
document d2i_X509_PUBKEY(3) and i2d_X509_PUBKEY(3);
while here, apply the usual conventions for naming d2i and i2d arguments
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/X509_PUBKEY_new.3 | 80 |
1 files changed, 57 insertions, 23 deletions
diff --git a/src/lib/libcrypto/man/X509_PUBKEY_new.3 b/src/lib/libcrypto/man/X509_PUBKEY_new.3 index 69afcb5adb..648b028d5d 100644 --- a/src/lib/libcrypto/man/X509_PUBKEY_new.3 +++ b/src/lib/libcrypto/man/X509_PUBKEY_new.3 | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | .\" $OpenBSD: X509_PUBKEY_new.3,v 1.16 2020/06/19 14:04:25 schwarze Exp $ | 1 | .\" $OpenBSD: X509_PUBKEY_new.3,v 1.17 2021/10/26 10:01:23 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) 2020 Ingo Schwarze <schwarze@openbsd.org> | 7 | .\" Copyright (c) 2020, 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 |
| @@ -65,7 +65,7 @@ | |||
| 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 67 | .\" | 67 | .\" |
| 68 | .Dd $Mdocdate: June 19 2020 $ | 68 | .Dd $Mdocdate: October 26 2021 $ |
| 69 | .Dt X509_PUBKEY_NEW 3 | 69 | .Dt X509_PUBKEY_NEW 3 |
| 70 | .Os | 70 | .Os |
| 71 | .Sh NAME | 71 | .Sh NAME |
| @@ -74,6 +74,8 @@ | |||
| 74 | .Nm X509_PUBKEY_set , | 74 | .Nm X509_PUBKEY_set , |
| 75 | .Nm X509_PUBKEY_get0 , | 75 | .Nm X509_PUBKEY_get0 , |
| 76 | .Nm X509_PUBKEY_get , | 76 | .Nm X509_PUBKEY_get , |
| 77 | .Nm d2i_X509_PUBKEY , | ||
| 78 | .Nm i2d_X509_PUBKEY , | ||
| 77 | .Nm d2i_PUBKEY , | 79 | .Nm d2i_PUBKEY , |
| 78 | .Nm i2d_PUBKEY , | 80 | .Nm i2d_PUBKEY , |
| 79 | .Nm d2i_PUBKEY_bio , | 81 | .Nm d2i_PUBKEY_bio , |
| @@ -104,36 +106,47 @@ | |||
| 104 | .Fo X509_PUBKEY_get | 106 | .Fo X509_PUBKEY_get |
| 105 | .Fa "X509_PUBKEY *key" | 107 | .Fa "X509_PUBKEY *key" |
| 106 | .Fc | 108 | .Fc |
| 109 | .Ft X509_PUBKEY * | ||
| 110 | .Fo d2i_X509_PUBKEY | ||
| 111 | .Fa "X509_PUBKEY **val_out" | ||
| 112 | .Fa "const unsigned char **der_in" | ||
| 113 | .Fa "long length" | ||
| 114 | .Fc | ||
| 115 | .Ft int | ||
| 116 | .Fo i2d_X509_PUBKEY | ||
| 117 | .Fa "X509_PUBKEY *val_in" | ||
| 118 | .Fa "unsigned char **der_out" | ||
| 119 | .Fc | ||
| 107 | .Ft EVP_PKEY * | 120 | .Ft EVP_PKEY * |
| 108 | .Fo d2i_PUBKEY | 121 | .Fo d2i_PUBKEY |
| 109 | .Fa "EVP_PKEY **a" | 122 | .Fa "EVP_PKEY **val_out" |
| 110 | .Fa "const unsigned char **pp" | 123 | .Fa "const unsigned char **der_in" |
| 111 | .Fa "long length" | 124 | .Fa "long length" |
| 112 | .Fc | 125 | .Fc |
| 113 | .Ft int | 126 | .Ft int |
| 114 | .Fo i2d_PUBKEY | 127 | .Fo i2d_PUBKEY |
| 115 | .Fa "EVP_PKEY *a" | 128 | .Fa "EVP_PKEY *val_in" |
| 116 | .Fa "unsigned char **pp" | 129 | .Fa "unsigned char **der_out" |
| 117 | .Fc | 130 | .Fc |
| 118 | .Ft EVP_PKEY * | 131 | .Ft EVP_PKEY * |
| 119 | .Fo d2i_PUBKEY_bio | 132 | .Fo d2i_PUBKEY_bio |
| 120 | .Fa "BIO *bp" | 133 | .Fa "BIO *bp" |
| 121 | .Fa "EVP_PKEY **a" | 134 | .Fa "EVP_PKEY **val_out" |
| 122 | .Fc | 135 | .Fc |
| 123 | .Ft EVP_PKEY * | 136 | .Ft EVP_PKEY * |
| 124 | .Fo d2i_PUBKEY_fp | 137 | .Fo d2i_PUBKEY_fp |
| 125 | .Fa "FILE *fp" | 138 | .Fa "FILE *fp" |
| 126 | .Fa "EVP_PKEY **a" | 139 | .Fa "EVP_PKEY **val_out" |
| 127 | .Fc | 140 | .Fc |
| 128 | .Ft int | 141 | .Ft int |
| 129 | .Fo i2d_PUBKEY_fp | 142 | .Fo i2d_PUBKEY_fp |
| 130 | .Fa "FILE *fp" | 143 | .Fa "FILE *fp" |
| 131 | .Fa "EVP_PKEY *pkey" | 144 | .Fa "EVP_PKEY *val_in" |
| 132 | .Fc | 145 | .Fc |
| 133 | .Ft int | 146 | .Ft int |
| 134 | .Fo i2d_PUBKEY_bio | 147 | .Fo i2d_PUBKEY_bio |
| 135 | .Fa "BIO *bp" | 148 | .Fa "BIO *bp" |
| 136 | .Fa "EVP_PKEY *pkey" | 149 | .Fa "EVP_PKEY *val_in" |
| 137 | .Fc | 150 | .Fc |
| 138 | .Ft int | 151 | .Ft int |
| 139 | .Fo X509_PUBKEY_set0_param | 152 | .Fo X509_PUBKEY_set0_param |
| @@ -202,14 +215,18 @@ count on the returned key is incremented so it must be freed using | |||
| 202 | .Xr EVP_PKEY_free 3 | 215 | .Xr EVP_PKEY_free 3 |
| 203 | after use. | 216 | after use. |
| 204 | .Pp | 217 | .Pp |
| 205 | .Fn d2i_PUBKEY | 218 | .Fn d2i_X509_PUBKEY , |
| 219 | .Fn i2d_X509_PUBKEY , | ||
| 220 | .Fn d2i_PUBKEY , | ||
| 206 | and | 221 | and |
| 207 | .Fn i2d_PUBKEY | 222 | .Fn i2d_PUBKEY |
| 208 | decode and encode an | 223 | decode and encode an ASN.1 |
| 209 | .Vt EVP_PKEY | ||
| 210 | structure using | ||
| 211 | .Vt SubjectPublicKeyInfo | 224 | .Vt SubjectPublicKeyInfo |
| 212 | format. | 225 | structure using either the |
| 226 | .Vt X509_PUBKEY | ||
| 227 | or the | ||
| 228 | .Vt EVP_PKEY | ||
| 229 | object type, respectively. | ||
| 213 | For details about the semantics, examples, caveats, and bugs, see | 230 | For details about the semantics, examples, caveats, and bugs, see |
| 214 | .Xr ASN1_item_d2i 3 . | 231 | .Xr ASN1_item_d2i 3 . |
| 215 | .Fn d2i_PUBKEY_bio , | 232 | .Fn d2i_PUBKEY_bio , |
| @@ -217,7 +234,11 @@ For details about the semantics, examples, caveats, and bugs, see | |||
| 217 | .Fn i2d_PUBKEY_bio | 234 | .Fn i2d_PUBKEY_bio |
| 218 | and | 235 | and |
| 219 | .Fn i2d_PUBKEY_fp | 236 | .Fn i2d_PUBKEY_fp |
| 220 | are similar except they decode or encode using a | 237 | are similar to |
| 238 | .Fn d2i_PUBKEY | ||
| 239 | and | ||
| 240 | .Fn i2d_PUBKEY | ||
| 241 | except they decode or encode using a | ||
| 221 | .Vt BIO | 242 | .Vt BIO |
| 222 | or | 243 | or |
| 223 | .Vt FILE | 244 | .Vt FILE |
| @@ -267,20 +288,29 @@ and sets an error code that can be obtained by | |||
| 267 | .Xr ERR_get_error 3 . | 288 | .Xr ERR_get_error 3 . |
| 268 | Otherwise it returns a pointer to the newly allocated structure. | 289 | Otherwise it returns a pointer to the newly allocated structure. |
| 269 | .Pp | 290 | .Pp |
| 270 | .Fn X509_PUBKEY_get0 , | 291 | .Fn X509_PUBKEY_get0 |
| 271 | .Fn X509_PUBKEY_get , | 292 | returns an internal pointer or |
| 293 | .Dv NULL | ||
| 294 | if an error occurs. | ||
| 295 | .Pp | ||
| 296 | .Fn X509_PUBKEY_get | ||
| 297 | returns a pointer to an object that had its reference count incremented or | ||
| 298 | .Dv NULL | ||
| 299 | if an error occurs. | ||
| 300 | .Pp | ||
| 301 | .Fn d2i_X509_PUBKEY , | ||
| 272 | .Fn d2i_PUBKEY , | 302 | .Fn d2i_PUBKEY , |
| 273 | .Fn d2i_PUBKEY_bio , | 303 | .Fn d2i_PUBKEY_bio , |
| 274 | and | 304 | and |
| 275 | .Fn d2i_PUBKEY_fp | 305 | .Fn d2i_PUBKEY_fp |
| 276 | return a pointer to an | 306 | return a pointer to a valid object or |
| 277 | .Vt EVP_PKEY | ||
| 278 | structure or | ||
| 279 | .Dv NULL | 307 | .Dv NULL |
| 280 | if an error occurs. | 308 | if an error occurs. |
| 281 | .Pp | 309 | .Pp |
| 310 | .Fn i2d_X509_PUBKEY | ||
| 311 | and | ||
| 282 | .Fn i2d_PUBKEY | 312 | .Fn i2d_PUBKEY |
| 283 | returns the number of bytes successfully encoded or a negative value | 313 | return the number of bytes successfully encoded or a negative value |
| 284 | if an error occurs. | 314 | if an error occurs. |
| 285 | .Pp | 315 | .Pp |
| 286 | .Fn X509_PUBKEY_set , | 316 | .Fn X509_PUBKEY_set , |
| @@ -336,6 +366,10 @@ Certificate Revocation List (CRL) Profile | |||
| 336 | and | 366 | and |
| 337 | .Fn X509_PUBKEY_free | 367 | .Fn X509_PUBKEY_free |
| 338 | appeared in SSLeay 0.4 or earlier. | 368 | appeared in SSLeay 0.4 or earlier. |
| 369 | .Fn d2i_X509_PUBKEY | ||
| 370 | and | ||
| 371 | .Fn i2d_X509_PUBKEY | ||
| 372 | first appeared in SSLeay 0.5.1. | ||
| 339 | .Fn X509_PUBKEY_set | 373 | .Fn X509_PUBKEY_set |
| 340 | and | 374 | and |
| 341 | .Fn X509_PUBKEY_get | 375 | .Fn X509_PUBKEY_get |
