summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/ameth_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/ameth_lib.c')
-rw-r--r--src/lib/libcrypto/asn1/ameth_lib.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c
index e9f9927620..5a1dfd7ce3 100644
--- a/src/lib/libcrypto/asn1/ameth_lib.c
+++ b/src/lib/libcrypto/asn1/ameth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ameth_lib.c,v 1.30 2022/11/26 16:08:50 tb Exp $ */ 1/* $OpenBSD: ameth_lib.c,v 1.31 2023/07/05 21:23:36 beck Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -120,6 +120,7 @@ EVP_PKEY_asn1_get_count(void)
120 120
121 return num; 121 return num;
122} 122}
123LCRYPTO_ALIAS(EVP_PKEY_asn1_get_count);
123 124
124const EVP_PKEY_ASN1_METHOD * 125const EVP_PKEY_ASN1_METHOD *
125EVP_PKEY_asn1_get0(int idx) 126EVP_PKEY_asn1_get0(int idx)
@@ -135,6 +136,7 @@ EVP_PKEY_asn1_get0(int idx)
135 136
136 return sk_EVP_PKEY_ASN1_METHOD_value(asn1_app_methods, idx); 137 return sk_EVP_PKEY_ASN1_METHOD_value(asn1_app_methods, idx);
137} 138}
139LCRYPTO_ALIAS(EVP_PKEY_asn1_get0);
138 140
139static const EVP_PKEY_ASN1_METHOD * 141static const EVP_PKEY_ASN1_METHOD *
140pkey_asn1_find(int pkey_id) 142pkey_asn1_find(int pkey_id)
@@ -183,6 +185,7 @@ EVP_PKEY_asn1_find(ENGINE **pe, int type)
183 } 185 }
184 return mp; 186 return mp;
185} 187}
188LCRYPTO_ALIAS(EVP_PKEY_asn1_find);
186 189
187const EVP_PKEY_ASN1_METHOD * 190const EVP_PKEY_ASN1_METHOD *
188EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len) 191EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len)
@@ -219,6 +222,7 @@ EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len)
219 } 222 }
220 return NULL; 223 return NULL;
221} 224}
225LCRYPTO_ALIAS(EVP_PKEY_asn1_find_str);
222 226
223int 227int
224EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth) 228EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth)
@@ -234,6 +238,7 @@ EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth)
234 238
235 return 1; 239 return 1;
236} 240}
241LCRYPTO_ALIAS(EVP_PKEY_asn1_add0);
237 242
238int 243int
239EVP_PKEY_asn1_add_alias(int to, int from) 244EVP_PKEY_asn1_add_alias(int to, int from)
@@ -251,6 +256,7 @@ EVP_PKEY_asn1_add_alias(int to, int from)
251 } 256 }
252 return 1; 257 return 1;
253} 258}
259LCRYPTO_ALIAS(EVP_PKEY_asn1_add_alias);
254 260
255int 261int
256EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags, 262EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
@@ -271,12 +277,14 @@ EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
271 *ppem_str = ameth->pem_str; 277 *ppem_str = ameth->pem_str;
272 return 1; 278 return 1;
273} 279}
280LCRYPTO_ALIAS(EVP_PKEY_asn1_get0_info);
274 281
275const EVP_PKEY_ASN1_METHOD* 282const EVP_PKEY_ASN1_METHOD*
276EVP_PKEY_get0_asn1(const EVP_PKEY *pkey) 283EVP_PKEY_get0_asn1(const EVP_PKEY *pkey)
277{ 284{
278 return pkey->ameth; 285 return pkey->ameth;
279} 286}
287LCRYPTO_ALIAS(EVP_PKEY_get0_asn1);
280 288
281EVP_PKEY_ASN1_METHOD* 289EVP_PKEY_ASN1_METHOD*
282EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info) 290EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info)
@@ -306,6 +314,7 @@ EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info)
306 EVP_PKEY_asn1_free(ameth); 314 EVP_PKEY_asn1_free(ameth);
307 return NULL; 315 return NULL;
308} 316}
317LCRYPTO_ALIAS(EVP_PKEY_asn1_new);
309 318
310void 319void
311EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, const EVP_PKEY_ASN1_METHOD *src) 320EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, const EVP_PKEY_ASN1_METHOD *src)
@@ -326,6 +335,7 @@ EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, const EVP_PKEY_ASN1_METHOD *src)
326 dst->pem_str = preserve.pem_str; 335 dst->pem_str = preserve.pem_str;
327 dst->info = preserve.info; 336 dst->info = preserve.info;
328} 337}
338LCRYPTO_ALIAS(EVP_PKEY_asn1_copy);
329 339
330void 340void
331EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth) 341EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth)
@@ -336,6 +346,7 @@ EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth)
336 free(ameth); 346 free(ameth);
337 } 347 }
338} 348}
349LCRYPTO_ALIAS(EVP_PKEY_asn1_free);
339 350
340void 351void
341EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, 352EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
@@ -354,6 +365,7 @@ EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
354 ameth->pkey_size = pkey_size; 365 ameth->pkey_size = pkey_size;
355 ameth->pkey_bits = pkey_bits; 366 ameth->pkey_bits = pkey_bits;
356} 367}
368LCRYPTO_ALIAS(EVP_PKEY_asn1_set_public);
357 369
358void 370void
359EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, 371EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
@@ -366,6 +378,7 @@ EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,
366 ameth->priv_encode = priv_encode; 378 ameth->priv_encode = priv_encode;
367 ameth->priv_print = priv_print; 379 ameth->priv_print = priv_print;
368} 380}
381LCRYPTO_ALIAS(EVP_PKEY_asn1_set_private);
369 382
370void 383void
371EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, 384EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
@@ -384,6 +397,7 @@ EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,
384 ameth->param_cmp = param_cmp; 397 ameth->param_cmp = param_cmp;
385 ameth->param_print = param_print; 398 ameth->param_print = param_print;
386} 399}
400LCRYPTO_ALIAS(EVP_PKEY_asn1_set_param);
387 401
388void 402void
389EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, 403EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
@@ -391,6 +405,7 @@ EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,
391{ 405{
392 ameth->pkey_free = pkey_free; 406 ameth->pkey_free = pkey_free;
393} 407}
408LCRYPTO_ALIAS(EVP_PKEY_asn1_set_free);
394 409
395void 410void
396EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, 411EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
@@ -398,6 +413,7 @@ EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
398{ 413{
399 ameth->pkey_ctrl = pkey_ctrl; 414 ameth->pkey_ctrl = pkey_ctrl;
400} 415}
416LCRYPTO_ALIAS(EVP_PKEY_asn1_set_ctrl);
401 417
402void 418void
403EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth, 419EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
@@ -405,6 +421,7 @@ EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
405{ 421{
406 ameth->pkey_security_bits = pkey_security_bits; 422 ameth->pkey_security_bits = pkey_security_bits;
407} 423}
424LCRYPTO_ALIAS(EVP_PKEY_asn1_set_security_bits);
408 425
409void 426void
410EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, 427EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
@@ -412,6 +429,7 @@ EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
412{ 429{
413 ameth->pkey_check = pkey_check; 430 ameth->pkey_check = pkey_check;
414} 431}
432LCRYPTO_ALIAS(EVP_PKEY_asn1_set_check);
415 433
416void 434void
417EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, 435EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth,
@@ -419,6 +437,7 @@ EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth,
419{ 437{
420 ameth->pkey_public_check = pkey_public_check; 438 ameth->pkey_public_check = pkey_public_check;
421} 439}
440LCRYPTO_ALIAS(EVP_PKEY_asn1_set_public_check);
422 441
423void 442void
424EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, 443EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth,
@@ -426,3 +445,4 @@ EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth,
426{ 445{
427 ameth->pkey_param_check = pkey_param_check; 446 ameth->pkey_param_check = pkey_param_check;
428} 447}
448LCRYPTO_ALIAS(EVP_PKEY_asn1_set_param_check);