diff options
| author | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
| commit | d56c8fa8260d226f98b26f017b45b9c2b135f38d (patch) | |
| tree | 348178b41617813cc93787187984a734ef8379ca /src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 | |
| parent | 18b9c1bcab7c37d8c5bd05b8e0d14d0c59d96650 (diff) | |
| download | openbsd-tb_20210818.tar.gz openbsd-tb_20210818.tar.bz2 openbsd-tb_20210818.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20210818'.tb_20210818
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_asn1_new.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 | 463 |
1 files changed, 0 insertions, 463 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 b/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 deleted file mode 100644 index 5d915d0183..0000000000 --- a/src/lib/libcrypto/man/EVP_PKEY_asn1_new.3 +++ /dev/null | |||
| @@ -1,463 +0,0 @@ | |||
| 1 | .\" $OpenBSD: EVP_PKEY_asn1_new.3,v 1.5 2019/09/01 09:10:09 schwarze Exp $ | ||
| 2 | .\" selective merge up to: | ||
| 3 | .\" OpenSSL man3/EVP_PKEY_ASN1_METHOD b0004708 Nov 1 00:45:24 2017 +0800 | ||
| 4 | .\" | ||
| 5 | .\" This file was written by Richard Levitte <levitte@openssl.org> | ||
| 6 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
| 7 | .\" | ||
| 8 | .\" Redistribution and use in source and binary forms, with or without | ||
| 9 | .\" modification, are permitted provided that the following conditions | ||
| 10 | .\" are met: | ||
| 11 | .\" | ||
| 12 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 13 | .\" notice, this list of conditions and the following disclaimer. | ||
| 14 | .\" | ||
| 15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | .\" notice, this list of conditions and the following disclaimer in | ||
| 17 | .\" the documentation and/or other materials provided with the | ||
| 18 | .\" distribution. | ||
| 19 | .\" | ||
| 20 | .\" 3. All advertising materials mentioning features or use of this | ||
| 21 | .\" software must display the following acknowledgment: | ||
| 22 | .\" "This product includes software developed by the OpenSSL Project | ||
| 23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 24 | .\" | ||
| 25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | .\" endorse or promote products derived from this software without | ||
| 27 | .\" prior written permission. For written permission, please contact | ||
| 28 | .\" openssl-core@openssl.org. | ||
| 29 | .\" | ||
| 30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 32 | .\" permission of the OpenSSL Project. | ||
| 33 | .\" | ||
| 34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | .\" acknowledgment: | ||
| 36 | .\" "This product includes software developed by the OpenSSL Project | ||
| 37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 38 | .\" | ||
| 39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | .\" | ||
| 52 | .Dd $Mdocdate: September 1 2019 $ | ||
| 53 | .Dt EVP_PKEY_ASN1_METHOD 3 | ||
| 54 | .Os | ||
| 55 | .Sh NAME | ||
| 56 | .Nm EVP_PKEY_asn1_new , | ||
| 57 | .Nm EVP_PKEY_asn1_copy , | ||
| 58 | .Nm EVP_PKEY_asn1_free , | ||
| 59 | .Nm EVP_PKEY_asn1_add0 , | ||
| 60 | .Nm EVP_PKEY_asn1_add_alias , | ||
| 61 | .Nm EVP_PKEY_asn1_set_public , | ||
| 62 | .Nm EVP_PKEY_asn1_set_private , | ||
| 63 | .Nm EVP_PKEY_asn1_set_param , | ||
| 64 | .Nm EVP_PKEY_asn1_set_free , | ||
| 65 | .Nm EVP_PKEY_asn1_set_ctrl | ||
| 66 | .Nd manipulating and registering an EVP_PKEY_ASN1_METHOD structure | ||
| 67 | .Sh SYNOPSIS | ||
| 68 | .In openssl/evp.h | ||
| 69 | .Ft EVP_PKEY_ASN1_METHOD * | ||
| 70 | .Fo EVP_PKEY_asn1_new | ||
| 71 | .Fa "int id" | ||
| 72 | .Fa "int flags" | ||
| 73 | .Fa "const char *pem_str" | ||
| 74 | .Fa "const char *info" | ||
| 75 | .Fc | ||
| 76 | .Ft void | ||
| 77 | .Fo EVP_PKEY_asn1_copy | ||
| 78 | .Fa "EVP_PKEY_ASN1_METHOD *dst" | ||
| 79 | .Fa "const EVP_PKEY_ASN1_METHOD *src" | ||
| 80 | .Fc | ||
| 81 | .Ft void | ||
| 82 | .Fo EVP_PKEY_asn1_free | ||
| 83 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 84 | .Fc | ||
| 85 | .Ft int | ||
| 86 | .Fo EVP_PKEY_asn1_add0 | ||
| 87 | .Fa "const EVP_PKEY_ASN1_METHOD *ameth" | ||
| 88 | .Fc | ||
| 89 | .Ft int | ||
| 90 | .Fo EVP_PKEY_asn1_add_alias | ||
| 91 | .Fa "int to" | ||
| 92 | .Fa "int from" | ||
| 93 | .Fc | ||
| 94 | .Ft void | ||
| 95 | .Fo EVP_PKEY_asn1_set_public | ||
| 96 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 97 | .Fa "int (*pub_decode)(EVP_PKEY *pk, X509_PUBKEY *pub)" | ||
| 98 | .Fa "int (*pub_encode)(X509_PUBKEY *pub, const EVP_PKEY *pk)" | ||
| 99 | .Fa "int (*pub_cmp)(const EVP_PKEY *a, const EVP_PKEY *b)" | ||
| 100 | .Fa "int (*pub_print)(BIO *out, const EVP_PKEY *pkey, int indent,\ | ||
| 101 | ASN1_PCTX *pctx)" | ||
| 102 | .Fa "int (*pkey_size)(const EVP_PKEY *pk)" | ||
| 103 | .Fa "int (*pkey_bits)(const EVP_PKEY *pk)" | ||
| 104 | .Fc | ||
| 105 | .Ft void | ||
| 106 | .Fo EVP_PKEY_asn1_set_private | ||
| 107 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 108 | .Fa "int (*priv_decode)(EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf)" | ||
| 109 | .Fa "int (*priv_encode)(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk)" | ||
| 110 | .Fa "int (*priv_print)(BIO *out, const EVP_PKEY *pkey, int indent,\ | ||
| 111 | ASN1_PCTX *pctx)" | ||
| 112 | .Fc | ||
| 113 | .Ft void | ||
| 114 | .Fo EVP_PKEY_asn1_set_param | ||
| 115 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 116 | .Fa "int (*param_decode)(EVP_PKEY *pkey, const unsigned char **pder,\ | ||
| 117 | int derlen)" | ||
| 118 | .Fa "int (*param_encode)(const EVP_PKEY *pkey, unsigned char **pder)" | ||
| 119 | .Fa "int (*param_missing)(const EVP_PKEY *pk)" | ||
| 120 | .Fa "int (*param_copy)(EVP_PKEY *to, const EVP_PKEY *from)" | ||
| 121 | .Fa "int (*param_cmp)(const EVP_PKEY *a, const EVP_PKEY *b)" | ||
| 122 | .Fa "int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent,\ | ||
| 123 | ASN1_PCTX *pctx)" | ||
| 124 | .Fc | ||
| 125 | .Ft void | ||
| 126 | .Fo EVP_PKEY_asn1_set_free | ||
| 127 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 128 | .Fa "void (*pkey_free)(EVP_PKEY *pkey)" | ||
| 129 | .Fc | ||
| 130 | .Ft void | ||
| 131 | .Fo EVP_PKEY_asn1_set_ctrl | ||
| 132 | .Fa "EVP_PKEY_ASN1_METHOD *ameth" | ||
| 133 | .Fa "int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)" | ||
| 134 | .Fc | ||
| 135 | .Sh DESCRIPTION | ||
| 136 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 137 | is a structure which holds a set of ASN.1 conversion, printing and | ||
| 138 | information methods for a specific public key algorithm. | ||
| 139 | .Pp | ||
| 140 | There are two places where the | ||
| 141 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 142 | objects are stored: one is a built-in array representing the standard | ||
| 143 | methods for different algorithms, and the other one is a stack of | ||
| 144 | user-defined application-specific methods, which can be manipulated by | ||
| 145 | using | ||
| 146 | .Fn EVP_PKEY_asn1_add0 . | ||
| 147 | .Ss Methods | ||
| 148 | The methods are the underlying implementations of a particular public | ||
| 149 | key algorithm present by the | ||
| 150 | .Vt EVP_PKEY | ||
| 151 | object. | ||
| 152 | .Bd -unfilled | ||
| 153 | .Ft int Fo (*pub_decode) | ||
| 154 | .Fa "EVP_PKEY *pk" | ||
| 155 | .Fa "X509_PUBKEY *pub" | ||
| 156 | .Fc | ||
| 157 | .Ft int Fo (*pub_encode) | ||
| 158 | .Fa "X509_PUBKEY *pub" | ||
| 159 | .Fa "const EVP_PKEY *pk" | ||
| 160 | .Fc | ||
| 161 | .Ft int Fo (*pub_cmp) | ||
| 162 | .Fa "const EVP_PKEY *a" | ||
| 163 | .Fa "const EVP_PKEY *b" | ||
| 164 | .Fc | ||
| 165 | .Ft int Fo (*pub_print) | ||
| 166 | .Fa "BIO *out" | ||
| 167 | .Fa "const EVP_PKEY *pkey" | ||
| 168 | .Fa "int indent" | ||
| 169 | .Fa "ASN1_PCTX *pctx" | ||
| 170 | .Fc | ||
| 171 | .Ed | ||
| 172 | .Pp | ||
| 173 | The | ||
| 174 | .Fn pub_decode | ||
| 175 | and | ||
| 176 | .Fn pub_encode | ||
| 177 | methods are called to decode and encode | ||
| 178 | .Vt X509_PUBKEY | ||
| 179 | ASN.1 parameters to and from | ||
| 180 | .Fa pk . | ||
| 181 | They must return 0 on error and 1 on success. | ||
| 182 | They are called by | ||
| 183 | .Xr X509_PUBKEY_get 3 | ||
| 184 | and | ||
| 185 | .Xr X509_PUBKEY_set 3 . | ||
| 186 | .Pp | ||
| 187 | The | ||
| 188 | .Fn pub_cmp | ||
| 189 | method is called when two public keys are compared. | ||
| 190 | It must return 1 when the keys are equal and 0 otherwise. | ||
| 191 | It is called by | ||
| 192 | .Xr EVP_PKEY_cmp 3 . | ||
| 193 | .Pp | ||
| 194 | The | ||
| 195 | .Fn pub_print | ||
| 196 | method is called to print a public key in humanly readable text to | ||
| 197 | .Fa out , | ||
| 198 | indented | ||
| 199 | .Fa indent | ||
| 200 | spaces. | ||
| 201 | It must return 0 on error and 1 on success. | ||
| 202 | It is called by | ||
| 203 | .Xr EVP_PKEY_print_public 3 . | ||
| 204 | .Bd -unfilled | ||
| 205 | .Ft int Fo (*priv_decode) | ||
| 206 | .Fa "EVP_PKEY *pk" | ||
| 207 | .Fa "const PKCS8_PRIV_KEY_INFO *p8inf" | ||
| 208 | .Fc | ||
| 209 | .Ft int Fo (*priv_encode) | ||
| 210 | .Fa "PKCS8_PRIV_KEY_INFO *p8" | ||
| 211 | .Fa "const EVP_PKEY *pk" | ||
| 212 | .Fc | ||
| 213 | .Ft int Fo (*priv_print) | ||
| 214 | .Fa "BIO *out" | ||
| 215 | .Fa "const EVP_PKEY *pkey" | ||
| 216 | .Fa "int indent" | ||
| 217 | .Fa "ASN1_PCTX *pctx" | ||
| 218 | .Fc | ||
| 219 | .Ed | ||
| 220 | .Pp | ||
| 221 | The | ||
| 222 | .Fn priv_decode | ||
| 223 | and | ||
| 224 | .Fn priv_encode | ||
| 225 | methods are called to decode and encode | ||
| 226 | .Vt PKCS8_PRIV_KEY_INFO | ||
| 227 | form private key to and from | ||
| 228 | .Fa pk . | ||
| 229 | They must return 0 on error, 1 on success. | ||
| 230 | They are called by | ||
| 231 | .Fn EVP_PKCS82PKEY | ||
| 232 | and | ||
| 233 | .Fn EVP_PKEY2PKCS8 . | ||
| 234 | .Pp | ||
| 235 | The | ||
| 236 | .Fn priv_print | ||
| 237 | method is called to print a private key in humanly readable text to | ||
| 238 | .Fa out , | ||
| 239 | indented | ||
| 240 | .Fa indent | ||
| 241 | spaces. | ||
| 242 | It must return 0 on error and 1 on success. | ||
| 243 | It is called by | ||
| 244 | .Xr EVP_PKEY_print_private 3 . | ||
| 245 | .Bd -unfilled | ||
| 246 | .Ft int Fn (*pkey_size) "const EVP_PKEY *pk" | ||
| 247 | .Ft int Fn (*pkey_bits) "const EVP_PKEY *pk"; | ||
| 248 | .Ed | ||
| 249 | .Pp | ||
| 250 | The | ||
| 251 | .Fn pkey_size | ||
| 252 | method returns the key size in bytes. | ||
| 253 | It is called by | ||
| 254 | .Xr EVP_PKEY_size 3 . | ||
| 255 | .Pp | ||
| 256 | The | ||
| 257 | .Fn pkey_bits | ||
| 258 | method returns the key size in bits. | ||
| 259 | It is called by | ||
| 260 | .Xr EVP_PKEY_bits 3 . | ||
| 261 | .Bd -unfilled | ||
| 262 | .Ft int Fo (*param_decode) | ||
| 263 | .Fa "EVP_PKEY *pkey" | ||
| 264 | .Fa "const unsigned char **pder" | ||
| 265 | .Fa "int derlen" | ||
| 266 | .Fc | ||
| 267 | .Ft int Fo (*param_encode) | ||
| 268 | .Fa "const EVP_PKEY *pkey" | ||
| 269 | .Fa "unsigned char **pder" | ||
| 270 | .Fc | ||
| 271 | .Ft int Fo (*param_missing) | ||
| 272 | .Fa "const EVP_PKEY *pk" | ||
| 273 | .Fc | ||
| 274 | .Ft int Fo (*param_copy) | ||
| 275 | .Fa "EVP_PKEY *to" | ||
| 276 | .Fa "const EVP_PKEY *from" | ||
| 277 | .Fc | ||
| 278 | .Ft int Fo (*param_cmp) | ||
| 279 | .Fa "const EVP_PKEY *a" | ||
| 280 | .Fa "const EVP_PKEY *b" | ||
| 281 | .Fc | ||
| 282 | .Ft int Fo (*param_print) | ||
| 283 | .Fa "BIO *out" | ||
| 284 | .Fa "const EVP_PKEY *pkey" | ||
| 285 | .Fa "int indent" | ||
| 286 | .Fa "ASN1_PCTX *pctx" | ||
| 287 | .Fc | ||
| 288 | .Ed | ||
| 289 | .Pp | ||
| 290 | The | ||
| 291 | .Fn param_decode | ||
| 292 | and | ||
| 293 | .Fn param_encode | ||
| 294 | methods are called to decode and encode DER formatted parameters to and from | ||
| 295 | .Fa pk . | ||
| 296 | They must return 0 on error and 1 on success. | ||
| 297 | They are called by | ||
| 298 | .Fn PEM_read_bio_Parameters . | ||
| 299 | .Pp | ||
| 300 | The | ||
| 301 | .Fn param_missing | ||
| 302 | method returns 0 if a key parameter is missing or otherwise 1. | ||
| 303 | It is called by | ||
| 304 | .Xr EVP_PKEY_missing_parameters 3 . | ||
| 305 | .Pp | ||
| 306 | The | ||
| 307 | .Fn param_copy | ||
| 308 | method copies key parameters from | ||
| 309 | .Fa from | ||
| 310 | to | ||
| 311 | .Fa to . | ||
| 312 | It must return 0 on error and 1 on success. | ||
| 313 | It is called by | ||
| 314 | .Xr EVP_PKEY_copy_parameters 3 . | ||
| 315 | .Pp | ||
| 316 | The | ||
| 317 | .Fn param_cmp | ||
| 318 | method compares the parameters of the keys | ||
| 319 | .Fa a | ||
| 320 | and | ||
| 321 | .Fa b . | ||
| 322 | It must return 1 when the keys are equal, 0 when not equal, and a | ||
| 323 | negative number on error. | ||
| 324 | It is called by | ||
| 325 | .Xr EVP_PKEY_cmp_parameters 3 . | ||
| 326 | .Pp | ||
| 327 | The | ||
| 328 | .Fn param_print | ||
| 329 | method prints the private key parameters in humanly readable text to | ||
| 330 | .Fa out , | ||
| 331 | indented | ||
| 332 | .Fa indent | ||
| 333 | spaces. | ||
| 334 | It must return 0 on error and 1 on success. | ||
| 335 | It is called by | ||
| 336 | .Xr EVP_PKEY_print_params 3 . | ||
| 337 | .Bd -unfilled | ||
| 338 | .Ft void Fn (*pkey_free) "EVP_PKEY *pkey" | ||
| 339 | .Ed | ||
| 340 | .Pp | ||
| 341 | The | ||
| 342 | .Fn pkey_free | ||
| 343 | method helps freeing the internals of | ||
| 344 | .Fa pkey . | ||
| 345 | It is called by | ||
| 346 | .Xr EVP_PKEY_free 3 , | ||
| 347 | .Xr EVP_PKEY_set_type 3 , | ||
| 348 | .Fn EVP_PKEY_set_type_str , | ||
| 349 | and | ||
| 350 | .Xr EVP_PKEY_assign 3 . | ||
| 351 | .Bd -unfilled | ||
| 352 | .Ft int Fo (*pkey_ctrl) | ||
| 353 | .Fa "EVP_PKEY *pkey" | ||
| 354 | .Fa "int op" | ||
| 355 | .Fa "long arg1" | ||
| 356 | .Fa "void *arg2" | ||
| 357 | .Fc | ||
| 358 | .Ed | ||
| 359 | .Pp | ||
| 360 | The | ||
| 361 | .Fn pkey_ctrl | ||
| 362 | method adds extra algorithm specific control. | ||
| 363 | It is called by | ||
| 364 | .Xr EVP_PKEY_get_default_digest_nid 3 , | ||
| 365 | .Fn PKCS7_SIGNER_INFO_set , | ||
| 366 | .Fn PKCS7_RECIP_INFO_set , | ||
| 367 | and other functions. | ||
| 368 | .Ss Functions | ||
| 369 | .Fn EVP_PKEY_asn1_new | ||
| 370 | creates and returns a new | ||
| 371 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 372 | object, and associates the given | ||
| 373 | .Fa id , | ||
| 374 | .Fa flags , | ||
| 375 | .Fa pem_str | ||
| 376 | and | ||
| 377 | .Fa info . | ||
| 378 | .Fa id | ||
| 379 | is a NID, | ||
| 380 | .Fa pem_str | ||
| 381 | is the PEM type string, | ||
| 382 | .Fa info | ||
| 383 | is a descriptive string. | ||
| 384 | If | ||
| 385 | .Dv ASN1_PKEY_SIGPARAM_NULL | ||
| 386 | is set in | ||
| 387 | .Fa flags , | ||
| 388 | the signature algorithm parameters are given the type | ||
| 389 | .Dv V_ASN1_NULL | ||
| 390 | by default, otherwise they will be given the type | ||
| 391 | .Dv V_ASN1_UNDEF | ||
| 392 | (i.e. the parameter is omitted). | ||
| 393 | See | ||
| 394 | .Xr X509_ALGOR_set0 3 | ||
| 395 | for more information. | ||
| 396 | .Pp | ||
| 397 | .Fn EVP_PKEY_asn1_copy | ||
| 398 | copies an | ||
| 399 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 400 | object from | ||
| 401 | .Fa src | ||
| 402 | to | ||
| 403 | .Fa dst . | ||
| 404 | This function is not thread safe, it is recommended to only use this when | ||
| 405 | initializing the application. | ||
| 406 | .Pp | ||
| 407 | .Fn EVP_PKEY_asn1_free | ||
| 408 | frees an existing | ||
| 409 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 410 | pointed by | ||
| 411 | .Fa ameth . | ||
| 412 | .Pp | ||
| 413 | .Fn EVP_PKEY_asn1_add0 | ||
| 414 | adds | ||
| 415 | .Fa ameth | ||
| 416 | to the user defined stack of methods unless another | ||
| 417 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 418 | with the same NID is already there. | ||
| 419 | This function is not thread safe, it is recommended to only use this when | ||
| 420 | initializing the application. | ||
| 421 | .Pp | ||
| 422 | .Fn EVP_PKEY_asn1_add_alias | ||
| 423 | creates an alias with the NID | ||
| 424 | .Fa to | ||
| 425 | for the | ||
| 426 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 427 | with NID | ||
| 428 | .Fa from | ||
| 429 | unless another | ||
| 430 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 431 | with the same NID is already added. | ||
| 432 | This function is not thread safe, it's recommended to only use this when | ||
| 433 | initializing the application. | ||
| 434 | .Pp | ||
| 435 | .Fn EVP_PKEY_asn1_set_public , | ||
| 436 | .Fn EVP_PKEY_asn1_set_private , | ||
| 437 | .Fn EVP_PKEY_asn1_set_param , | ||
| 438 | .Fn EVP_PKEY_asn1_set_free , | ||
| 439 | and | ||
| 440 | .Fn EVP_PKEY_asn1_set_ctrl | ||
| 441 | set the diverse methods of the given | ||
| 442 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 443 | object. | ||
| 444 | .Sh RETURN VALUES | ||
| 445 | .Fn EVP_PKEY_asn1_new | ||
| 446 | returns a pointer to an | ||
| 447 | .Vt EVP_PKEY_ASN1_METHOD | ||
| 448 | object or | ||
| 449 | .Dv NULL | ||
| 450 | on error. | ||
| 451 | .Pp | ||
| 452 | .Fn EVP_PKEY_asn1_add0 | ||
| 453 | and | ||
| 454 | .Fn EVP_PKEY_asn1_add_alias | ||
| 455 | return 0 on error or 1 on success. | ||
| 456 | .Sh SEE ALSO | ||
| 457 | .Xr EVP_PKEY_asn1_get_count 3 , | ||
| 458 | .Xr EVP_PKEY_new 3 , | ||
| 459 | .Xr X509_PUBKEY_new 3 | ||
| 460 | .Sh HISTORY | ||
| 461 | These functions first appeared in OpenSSL 1.0.0 | ||
| 462 | and have been available since | ||
| 463 | .Ox 4.9 . | ||
