1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
9 .de Vb \" Begin verbatim text
14 .de Ve \" End verbatim text
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD. Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
54 .\" Avoid warning from groff about undefined register 'F'.
60 . tm Index:\\$1\t\\n%\t"\\$2"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear. Run. Save yourself. No user-serviceable parts.
70 . \" fudge factors for nroff and troff
79 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
85 . \" simple accents for nroff and troff
95 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
102 . \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 . \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 . \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
129 .\" ========================================================================
131 .IX Title "EVP_PKEY_ASN1_METHOD 3"
132 .TH EVP_PKEY_ASN1_METHOD 3 "2018-11-20" "1.1.1a" "OpenSSL"
133 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
138 EVP_PKEY_ASN1_METHOD, EVP_PKEY_asn1_new, EVP_PKEY_asn1_copy, EVP_PKEY_asn1_free, EVP_PKEY_asn1_add0, EVP_PKEY_asn1_add_alias, EVP_PKEY_asn1_set_public, EVP_PKEY_asn1_set_private, EVP_PKEY_asn1_set_param, EVP_PKEY_asn1_set_free, EVP_PKEY_asn1_set_ctrl, EVP_PKEY_asn1_set_item, EVP_PKEY_asn1_set_siginf, EVP_PKEY_asn1_set_check, EVP_PKEY_asn1_set_public_check, EVP_PKEY_asn1_set_param_check, EVP_PKEY_asn1_set_security_bits, EVP_PKEY_asn1_set_set_priv_key, EVP_PKEY_asn1_set_set_pub_key, EVP_PKEY_asn1_set_get_priv_key, EVP_PKEY_asn1_set_get_pub_key, EVP_PKEY_get0_asn1 \&\- manipulating and registering EVP_PKEY_ASN1_METHOD structure
140 .IX Header "SYNOPSIS"
142 \& #include <openssl/evp.h>
144 \& typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
146 \& EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
147 \& const char *pem_str,
148 \& const char *info);
149 \& void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
150 \& const EVP_PKEY_ASN1_METHOD *src);
151 \& void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);
152 \& int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);
153 \& int EVP_PKEY_asn1_add_alias(int to, int from);
155 \& void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
156 \& int (*pub_decode) (EVP_PKEY *pk,
157 \& X509_PUBKEY *pub),
158 \& int (*pub_encode) (X509_PUBKEY *pub,
159 \& const EVP_PKEY *pk),
160 \& int (*pub_cmp) (const EVP_PKEY *a,
161 \& const EVP_PKEY *b),
162 \& int (*pub_print) (BIO *out,
163 \& const EVP_PKEY *pkey,
164 \& int indent, ASN1_PCTX *pctx),
165 \& int (*pkey_size) (const EVP_PKEY *pk),
166 \& int (*pkey_bits) (const EVP_PKEY *pk));
167 \& void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
168 \& int (*priv_decode) (EVP_PKEY *pk,
169 \& const PKCS8_PRIV_KEY_INFO
171 \& int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,
172 \& const EVP_PKEY *pk),
173 \& int (*priv_print) (BIO *out,
174 \& const EVP_PKEY *pkey,
176 \& ASN1_PCTX *pctx));
177 \& void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
178 \& int (*param_decode) (EVP_PKEY *pkey,
179 \& const unsigned char **pder,
181 \& int (*param_encode) (const EVP_PKEY *pkey,
182 \& unsigned char **pder),
183 \& int (*param_missing) (const EVP_PKEY *pk),
184 \& int (*param_copy) (EVP_PKEY *to,
185 \& const EVP_PKEY *from),
186 \& int (*param_cmp) (const EVP_PKEY *a,
187 \& const EVP_PKEY *b),
188 \& int (*param_print) (BIO *out,
189 \& const EVP_PKEY *pkey,
191 \& ASN1_PCTX *pctx));
193 \& void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
194 \& void (*pkey_free) (EVP_PKEY *pkey));
195 \& void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
196 \& int (*pkey_ctrl) (EVP_PKEY *pkey, int op,
197 \& long arg1, void *arg2));
198 \& void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
199 \& int (*item_verify) (EVP_MD_CTX *ctx,
200 \& const ASN1_ITEM *it,
203 \& ASN1_BIT_STRING *sig,
205 \& int (*item_sign) (EVP_MD_CTX *ctx,
206 \& const ASN1_ITEM *it,
210 \& ASN1_BIT_STRING *sig));
212 \& void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
213 \& int (*siginf_set) (X509_SIG_INFO *siginf,
214 \& const X509_ALGOR *alg,
215 \& const ASN1_STRING *sig));
217 \& void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
218 \& int (*pkey_check) (const EVP_PKEY *pk));
220 \& void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth,
221 \& int (*pkey_pub_check) (const EVP_PKEY *pk));
223 \& void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth,
224 \& int (*pkey_param_check) (const EVP_PKEY *pk));
226 \& void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
227 \& int (*pkey_security_bits) (const EVP_PKEY
230 \& void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
231 \& int (*set_priv_key) (EVP_PKEY *pk,
232 \& const unsigned char
236 \& void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
237 \& int (*set_pub_key) (EVP_PKEY *pk,
238 \& const unsigned char *pub,
241 \& void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth,
242 \& int (*get_priv_key) (const EVP_PKEY *pk,
243 \& unsigned char *priv,
246 \& void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth,
247 \& int (*get_pub_key) (const EVP_PKEY *pk,
248 \& unsigned char *pub,
251 \& const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
254 .IX Header "DESCRIPTION"
255 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR is a structure which holds a set of \s-1ASN.1\s0
256 conversion, printing and information methods for a specific public key
259 There are two places where the \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR objects are
260 stored: one is a built-in array representing the standard methods for
261 different algorithms, and the other one is a stack of user-defined
262 application-specific methods, which can be manipulated by using
263 \&\fIEVP_PKEY_asn1_add0\fR\|(3).
265 .IX Subsection "Methods"
266 The methods are the underlying implementations of a particular public
267 key algorithm present by the \fB\s-1EVP_PKEY\s0\fR object.
270 \& int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub);
271 \& int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk);
272 \& int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b);
273 \& int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent,
277 The \fIpub_decode()\fR and \fIpub_encode()\fR methods are called to decode /
278 encode \fBX509_PUBKEY\fR \s-1ASN.1\s0 parameters to / from \fBpk\fR.
279 They \s-1MUST\s0 return 0 on error, 1 on success.
280 They're called by \fIX509_PUBKEY_get0\fR\|(3) and \fIX509_PUBKEY_set\fR\|(3).
282 The \fIpub_cmp()\fR method is called when two public keys are to be
284 It \s-1MUST\s0 return 1 when the keys are equal, 0 otherwise.
285 It's called by \fIEVP_PKEY_cmp\fR\|(3).
287 The \fIpub_print()\fR method is called to print a public key in humanly
288 readable text to \fBout\fR, indented \fBindent\fR spaces.
289 It \s-1MUST\s0 return 0 on error, 1 on success.
290 It's called by \fIEVP_PKEY_print_public\fR\|(3).
293 \& int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf);
294 \& int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk);
295 \& int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent,
299 The \fIpriv_decode()\fR and \fIpriv_encode()\fR methods are called to decode /
300 encode \fB\s-1PKCS8_PRIV_KEY_INFO\s0\fR form private key to / from \fBpk\fR.
301 They \s-1MUST\s0 return 0 on error, 1 on success.
302 They're called by \s-1\fIEVP_PKCS82PKEY\s0\fR\|(3) and \s-1\fIEVP_PKEY2PKCS8\s0\fR\|(3).
304 The \fIpriv_print()\fR method is called to print a private key in humanly
305 readable text to \fBout\fR, indented \fBindent\fR spaces.
306 It \s-1MUST\s0 return 0 on error, 1 on success.
307 It's called by \fIEVP_PKEY_print_private\fR\|(3).
310 \& int (*pkey_size) (const EVP_PKEY *pk);
311 \& int (*pkey_bits) (const EVP_PKEY *pk);
312 \& int (*pkey_security_bits) (const EVP_PKEY *pk);
315 The \fIpkey_size()\fR method returns the key size in bytes.
316 It's called by \fIEVP_PKEY_size\fR\|(3).
318 The \fIpkey_bits()\fR method returns the key size in bits.
319 It's called by \fIEVP_PKEY_bits\fR\|(3).
322 \& int (*param_decode) (EVP_PKEY *pkey,
323 \& const unsigned char **pder, int derlen);
324 \& int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder);
325 \& int (*param_missing) (const EVP_PKEY *pk);
326 \& int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from);
327 \& int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b);
328 \& int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent,
332 The \fIparam_decode()\fR and \fIparam_encode()\fR methods are called to decode /
333 encode \s-1DER\s0 formatted parameters to / from \fBpk\fR.
334 They \s-1MUST\s0 return 0 on error, 1 on success.
335 They're called by \fIPEM_read_bio_Parameters\fR\|(3) and the \fBfile:\fR
336 \&\s-1\fIOSSL_STORE_LOADER\s0\fR\|(3).
338 The \fIparam_missing()\fR method returns 0 if a key parameter is missing,
340 It's called by \fIEVP_PKEY_missing_parameters\fR\|(3).
342 The \fIparam_copy()\fR method copies key parameters from \fBfrom\fR to \fBto\fR.
343 It \s-1MUST\s0 return 0 on error, 1 on success.
344 It's called by \fIEVP_PKEY_copy_parameters\fR\|(3).
346 The \fIparam_cmp()\fR method compares the parameters of keys \fBa\fR and \fBb\fR.
347 It \s-1MUST\s0 return 1 when the keys are equal, 0 when not equal, or a
348 negative number on error.
349 It's called by \fIEVP_PKEY_cmp_parameters\fR\|(3).
351 The \fIparam_print()\fR method prints the private key parameters in humanly
352 readable text to \fBout\fR, indented \fBindent\fR spaces.
353 It \s-1MUST\s0 return 0 on error, 1 on success.
354 It's called by \fIEVP_PKEY_print_params\fR\|(3).
357 \& int (*sig_print) (BIO *out,
358 \& const X509_ALGOR *sigalg, const ASN1_STRING *sig,
359 \& int indent, ASN1_PCTX *pctx);
362 The \fIsig_print()\fR method prints a signature in humanly readable text to
363 \&\fBout\fR, indented \fBindent\fR spaces.
364 \&\fBsigalg\fR contains the exact signature algorithm.
365 If the signature in \fBsig\fR doesn't correspond to what this method
366 expects, \fIX509_signature_dump()\fR must be used as a last resort.
367 It \s-1MUST\s0 return 0 on error, 1 on success.
368 It's called by \fIX509_signature_print\fR\|(3).
371 \& void (*pkey_free) (EVP_PKEY *pkey);
374 The \fIpkey_free()\fR method helps freeing the internals of \fBpkey\fR.
375 It's called by \fIEVP_PKEY_free\fR\|(3), \fIEVP_PKEY_set_type\fR\|(3),
376 \&\fIEVP_PKEY_set_type_str\fR\|(3), and \fIEVP_PKEY_assign\fR\|(3).
379 \& int (*pkey_ctrl) (EVP_PKEY *pkey, int op, long arg1, void *arg2);
382 The \fIpkey_ctrl()\fR method adds extra algorithm specific control.
383 It's called by \fIEVP_PKEY_get_default_digest_nid\fR\|(3),
384 \&\fIEVP_PKEY_set1_tls_encodedpoint\fR\|(3),
385 \&\fIEVP_PKEY_get1_tls_encodedpoint\fR\|(3), \fIPKCS7_SIGNER_INFO_set\fR\|(3),
386 \&\fIPKCS7_RECIP_INFO_set\fR\|(3), ...
389 \& int (*old_priv_decode) (EVP_PKEY *pkey,
390 \& const unsigned char **pder, int derlen);
391 \& int (*old_priv_encode) (const EVP_PKEY *pkey, unsigned char **pder);
394 The \fIold_priv_decode()\fR and \fIold_priv_encode()\fR methods decode / encode
395 they private key \fBpkey\fR from / to a \s-1DER\s0 formatted array.
396 These are exclusively used to help decoding / encoding older (pre
397 PKCS#8) \s-1PEM\s0 formatted encrypted private keys.
398 \&\fIold_priv_decode()\fR \s-1MUST\s0 return 0 on error, 1 on success.
399 \&\fIold_priv_encode()\fR \s-1MUST\s0 the return same kind of values as
400 \&\fIi2d_PrivateKey()\fR.
401 They're called by \fId2i_PrivateKey\fR\|(3) and \fIi2d_PrivateKey\fR\|(3).
404 \& int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
405 \& X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey);
406 \& int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
407 \& X509_ALGOR *alg1, X509_ALGOR *alg2,
408 \& ASN1_BIT_STRING *sig);
411 The \fIitem_sign()\fR and \fIitem_verify()\fR methods make it possible to have
412 algorithm specific signatures and verification of them.
414 \&\fIitem_sign()\fR \s-1MUST\s0 return one of:
420 \&\fIitem_sign()\fR did everything, OpenSSL internals just needs to pass the
421 signature length back.
424 \&\fIitem_sign()\fR did nothing, OpenSSL internal standard routines are
425 expected to continue with the default signature production.
428 \&\fIitem_sign()\fR set the algorithm identifier \fBalgor1\fR and \fBalgor2\fR,
429 OpenSSL internals should just sign using those algorithms.
431 \&\fIitem_verify()\fR \s-1MUST\s0 return one of:
437 \&\fIitem_sign()\fR did everything, OpenSSL internals just needs to pass the
438 signature length back.
441 \&\fIitem_sign()\fR did nothing, OpenSSL internal standard routines are
442 expected to continue with the default signature production.
444 \&\fIitem_verify()\fR and \fIitem_sign()\fR are called by \fIASN1_item_verify\fR\|(3) and
445 \&\fIASN1_item_sign\fR\|(3), and by extension, \fIX509_verify\fR\|(3),
446 \&\fIX509_REQ_verify\fR\|(3), \fIX509_sign\fR\|(3), \fIX509_REQ_sign\fR\|(3), ...
449 \& int (*siginf_set) (X509_SIG_INFO *siginf, const X509_ALGOR *alg,
450 \& const ASN1_STRING *sig);
453 The \fIsiginf_set()\fR method is used to set custom \fBX509_SIG_INFO\fR
455 It \s-1MUST\s0 return 0 on error, or 1 on success.
456 It's called as part of \fIX509_check_purpose\fR\|(3), \fIX509_check_ca\fR\|(3)
457 and \fIX509_check_issued\fR\|(3).
460 \& int (*pkey_check) (const EVP_PKEY *pk);
461 \& int (*pkey_public_check) (const EVP_PKEY *pk);
462 \& int (*pkey_param_check) (const EVP_PKEY *pk);
465 The \fIpkey_check()\fR, \fIpkey_public_check()\fR and \fIpkey_param_check()\fR methods are used
466 to check the validity of \fBpk\fR for key-pair, public component and parameters,
468 They \s-1MUST\s0 return 0 for an invalid key, or 1 for a valid key.
469 They are called by \fIEVP_PKEY_check\fR\|(3), \fIEVP_PKEY_public_check\fR\|(3) and
470 \&\fIEVP_PKEY_param_check\fR\|(3) respectively.
473 \& int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len);
474 \& int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len);
477 The \fIset_priv_key()\fR and \fIset_pub_key()\fR methods are used to set the raw private and
478 public key data for an \s-1EVP_PKEY.\s0 They \s-1MUST\s0 return 0 on error, or 1 on success.
479 They are called by \fIEVP_PKEY_new_raw_private_key\fR\|(3), and
480 \&\fIEVP_PKEY_new_raw_public_key\fR\|(3) respectively.
482 .IX Subsection "Functions"
483 \&\fIEVP_PKEY_asn1_new()\fR creates and returns a new \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR
484 object, and associates the given \fBid\fR, \fBflags\fR, \fBpem_str\fR and
486 \&\fBid\fR is a \s-1NID,\s0 \fBpem_str\fR is the \s-1PEM\s0 type string, \fBinfo\fR is a
488 The following \fBflags\fR are supported:
491 \& ASN1_PKEY_SIGPARAM_NULL
494 If \fB\s-1ASN1_PKEY_SIGPARAM_NULL\s0\fR is set, then the signature algorithm
495 parameters are given the type \fBV_ASN1_NULL\fR by default, otherwise
496 they will be given the type \fBV_ASN1_UNDEF\fR (i.e. the parameter is
498 See \fIX509_ALGOR_set0\fR\|(3) for more information.
500 \&\fIEVP_PKEY_asn1_copy()\fR copies an \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR object from
501 \&\fBsrc\fR to \fBdst\fR.
502 This function is not thread safe, it's recommended to only use this
503 when initializing the application.
505 \&\fIEVP_PKEY_asn1_free()\fR frees an existing \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR pointed
508 \&\fIEVP_PKEY_asn1_add0()\fR adds \fBameth\fR to the user defined stack of
509 methods unless another \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR with the same \s-1NID\s0 is
511 This function is not thread safe, it's recommended to only use this
512 when initializing the application.
514 \&\fIEVP_PKEY_asn1_add_alias()\fR creates an alias with the \s-1NID\s0 \fBto\fR for the
515 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR with \s-1NID\s0 \fBfrom\fR unless another
516 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR with the same \s-1NID\s0 is already added.
517 This function is not thread safe, it's recommended to only use this
518 when initializing the application.
520 \&\fIEVP_PKEY_asn1_set_public()\fR, \fIEVP_PKEY_asn1_set_private()\fR,
521 \&\fIEVP_PKEY_asn1_set_param()\fR, \fIEVP_PKEY_asn1_set_free()\fR,
522 \&\fIEVP_PKEY_asn1_set_ctrl()\fR, \fIEVP_PKEY_asn1_set_item()\fR,
523 \&\fIEVP_PKEY_asn1_set_siginf()\fR, \fIEVP_PKEY_asn1_set_check()\fR,
524 \&\fIEVP_PKEY_asn1_set_public_check()\fR, \fIEVP_PKEY_asn1_set_param_check()\fR,
525 \&\fIEVP_PKEY_asn1_set_security_bits()\fR, \fIEVP_PKEY_asn1_set_set_priv_key()\fR,
526 \&\fIEVP_PKEY_asn1_set_set_pub_key()\fR, \fIEVP_PKEY_asn1_set_get_priv_key()\fR and
527 \&\fIEVP_PKEY_asn1_set_get_pub_key()\fR set the diverse methods of the given
528 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR object.
530 \&\fIEVP_PKEY_get0_asn1()\fR finds the \fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR associated
531 with the key \fBpkey\fR.
533 .IX Header "RETURN VALUES"
534 \&\fIEVP_PKEY_asn1_new()\fR returns \s-1NULL\s0 on error, or a pointer to an
535 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR object otherwise.
537 \&\fIEVP_PKEY_asn1_add0()\fR and \fIEVP_PKEY_asn1_add_alias()\fR return 0 on error,
540 \&\fIEVP_PKEY_get0_asn1()\fR returns \s-1NULL\s0 on error, or a pointer to a constant
541 \&\fB\s-1EVP_PKEY_ASN1_METHOD\s0\fR object otherwise.
543 .IX Header "COPYRIGHT"
544 Copyright 2017\-2018 The OpenSSL Project Authors. All Rights Reserved.
546 Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
547 this file except in compliance with the License. You can obtain a copy
548 in the file \s-1LICENSE\s0 in the source distribution or at
549 <https://www.openssl.org/source/license.html>.