summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/p_lib.c
diff options
context:
space:
mode:
authorbeck <>2023-07-07 19:37:54 +0000
committerbeck <>2023-07-07 19:37:54 +0000
commit8d42940c1d19bb9bd4ce45580f18a59069225432 (patch)
treeb1fe16b4625998f0f024f4d3eef5d59a3e905a9a /src/lib/libcrypto/evp/p_lib.c
parent1c5e77a1d6f97589e2bca622f3313c1418f9a535 (diff)
downloadopenbsd-8d42940c1d19bb9bd4ce45580f18a59069225432.tar.gz
openbsd-8d42940c1d19bb9bd4ce45580f18a59069225432.tar.bz2
openbsd-8d42940c1d19bb9bd4ce45580f18a59069225432.zip
Unbreak the namespace build after a broken mk.conf and tool misfire had
me aliasing symbols not in the headers I was procesing. This unbreaks the namespace build so it will pass again ok tb@
Diffstat (limited to 'src/lib/libcrypto/evp/p_lib.c')
-rw-r--r--src/lib/libcrypto/evp/p_lib.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c
index 325fb605df..85e7978ff4 100644
--- a/src/lib/libcrypto/evp/p_lib.c
+++ b/src/lib/libcrypto/evp/p_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_lib.c,v 1.33 2023/07/07 13:54:46 beck Exp $ */ 1/* $OpenBSD: p_lib.c,v 1.34 2023/07/07 19:37:54 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -93,7 +93,6 @@ EVP_PKEY_bits(const EVP_PKEY *pkey)
93 return pkey->ameth->pkey_bits(pkey); 93 return pkey->ameth->pkey_bits(pkey);
94 return 0; 94 return 0;
95} 95}
96LCRYPTO_ALIAS(EVP_PKEY_bits);
97 96
98int 97int
99EVP_PKEY_security_bits(const EVP_PKEY *pkey) 98EVP_PKEY_security_bits(const EVP_PKEY *pkey)
@@ -105,7 +104,6 @@ EVP_PKEY_security_bits(const EVP_PKEY *pkey)
105 104
106 return pkey->ameth->pkey_security_bits(pkey); 105 return pkey->ameth->pkey_security_bits(pkey);
107} 106}
108LCRYPTO_ALIAS(EVP_PKEY_security_bits);
109 107
110int 108int
111EVP_PKEY_size(const EVP_PKEY *pkey) 109EVP_PKEY_size(const EVP_PKEY *pkey)
@@ -114,7 +112,6 @@ EVP_PKEY_size(const EVP_PKEY *pkey)
114 return pkey->ameth->pkey_size(pkey); 112 return pkey->ameth->pkey_size(pkey);
115 return 0; 113 return 0;
116} 114}
117LCRYPTO_ALIAS(EVP_PKEY_size);
118 115
119int 116int
120EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) 117EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode)
@@ -139,7 +136,6 @@ EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode)
139#endif 136#endif
140 return (0); 137 return (0);
141} 138}
142LCRYPTO_ALIAS(EVP_PKEY_save_parameters);
143 139
144int 140int
145EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) 141EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
@@ -159,7 +155,6 @@ EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
159err: 155err:
160 return 0; 156 return 0;
161} 157}
162LCRYPTO_ALIAS(EVP_PKEY_copy_parameters);
163 158
164int 159int
165EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) 160EVP_PKEY_missing_parameters(const EVP_PKEY *pkey)
@@ -168,7 +163,6 @@ EVP_PKEY_missing_parameters(const EVP_PKEY *pkey)
168 return pkey->ameth->param_missing(pkey); 163 return pkey->ameth->param_missing(pkey);
169 return 0; 164 return 0;
170} 165}
171LCRYPTO_ALIAS(EVP_PKEY_missing_parameters);
172 166
173int 167int
174EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) 168EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
@@ -179,7 +173,6 @@ EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
179 return a->ameth->param_cmp(a, b); 173 return a->ameth->param_cmp(a, b);
180 return -2; 174 return -2;
181} 175}
182LCRYPTO_ALIAS(EVP_PKEY_cmp_parameters);
183 176
184int 177int
185EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) 178EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
@@ -202,7 +195,6 @@ EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
202 195
203 return -2; 196 return -2;
204} 197}
205LCRYPTO_ALIAS(EVP_PKEY_cmp);
206 198
207EVP_PKEY * 199EVP_PKEY *
208EVP_PKEY_new(void) 200EVP_PKEY_new(void)
@@ -224,7 +216,6 @@ EVP_PKEY_new(void)
224 ret->save_parameters = 1; 216 ret->save_parameters = 1;
225 return (ret); 217 return (ret);
226} 218}
227LCRYPTO_ALIAS(EVP_PKEY_new);
228 219
229int 220int
230EVP_PKEY_up_ref(EVP_PKEY *pkey) 221EVP_PKEY_up_ref(EVP_PKEY *pkey)
@@ -232,7 +223,6 @@ EVP_PKEY_up_ref(EVP_PKEY *pkey)
232 int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); 223 int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
233 return ((refs > 1) ? 1 : 0); 224 return ((refs > 1) ? 1 : 0);
234} 225}
235LCRYPTO_ALIAS(EVP_PKEY_up_ref);
236 226
237/* Setup a public key ASN1 method and ENGINE from a NID or a string. 227/* Setup a public key ASN1 method and ENGINE from a NID or a string.
238 * If pkey is NULL just return 1 or 0 if the algorithm exists. 228 * If pkey is NULL just return 1 or 0 if the algorithm exists.
@@ -287,7 +277,6 @@ EVP_PKEY_set_type(EVP_PKEY *pkey, int type)
287{ 277{
288 return pkey_set_type(pkey, NULL, type, NULL, -1); 278 return pkey_set_type(pkey, NULL, type, NULL, -1);
289} 279}
290LCRYPTO_ALIAS(EVP_PKEY_set_type);
291 280
292EVP_PKEY * 281EVP_PKEY *
293EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, 282EVP_PKEY_new_raw_private_key(int type, ENGINE *engine,
@@ -317,7 +306,6 @@ EVP_PKEY_new_raw_private_key(int type, ENGINE *engine,
317 306
318 return NULL; 307 return NULL;
319} 308}
320LCRYPTO_ALIAS(EVP_PKEY_new_raw_private_key);
321 309
322EVP_PKEY * 310EVP_PKEY *
323EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, 311EVP_PKEY_new_raw_public_key(int type, ENGINE *engine,
@@ -347,7 +335,6 @@ EVP_PKEY_new_raw_public_key(int type, ENGINE *engine,
347 335
348 return NULL; 336 return NULL;
349} 337}
350LCRYPTO_ALIAS(EVP_PKEY_new_raw_public_key);
351 338
352int 339int
353EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, 340EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey,
@@ -364,7 +351,6 @@ EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey,
364 351
365 return 1; 352 return 1;
366} 353}
367LCRYPTO_ALIAS(EVP_PKEY_get_raw_private_key);
368 354
369int 355int
370EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, 356EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey,
@@ -381,7 +367,6 @@ EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey,
381 367
382 return 1; 368 return 1;
383} 369}
384LCRYPTO_ALIAS(EVP_PKEY_get_raw_public_key);
385 370
386EVP_PKEY * 371EVP_PKEY *
387EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, 372EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len,
@@ -412,14 +397,12 @@ EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len,
412 CMAC_CTX_free(cmctx); 397 CMAC_CTX_free(cmctx);
413 return NULL; 398 return NULL;
414} 399}
415LCRYPTO_ALIAS(EVP_PKEY_new_CMAC_key);
416 400
417int 401int
418EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) 402EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len)
419{ 403{
420 return pkey_set_type(pkey, NULL, EVP_PKEY_NONE, str, len); 404 return pkey_set_type(pkey, NULL, EVP_PKEY_NONE, str, len);
421} 405}
422LCRYPTO_ALIAS(EVP_PKEY_set_type_str);
423 406
424int 407int
425EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) 408EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
@@ -429,14 +412,12 @@ EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
429 pkey->pkey.ptr = key; 412 pkey->pkey.ptr = key;
430 return (key != NULL); 413 return (key != NULL);
431} 414}
432LCRYPTO_ALIAS(EVP_PKEY_assign);
433 415
434void * 416void *
435EVP_PKEY_get0(const EVP_PKEY *pkey) 417EVP_PKEY_get0(const EVP_PKEY *pkey)
436{ 418{
437 return pkey->pkey.ptr; 419 return pkey->pkey.ptr;
438} 420}
439LCRYPTO_ALIAS(EVP_PKEY_get0);
440 421
441const unsigned char * 422const unsigned char *
442EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) 423EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len)
@@ -453,7 +434,6 @@ EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len)
453 434
454 return os->data; 435 return os->data;
455} 436}
456LCRYPTO_ALIAS(EVP_PKEY_get0_hmac);
457 437
458#ifndef OPENSSL_NO_RSA 438#ifndef OPENSSL_NO_RSA
459RSA * 439RSA *
@@ -465,7 +445,6 @@ EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
465 } 445 }
466 return pkey->pkey.rsa; 446 return pkey->pkey.rsa;
467} 447}
468LCRYPTO_ALIAS(EVP_PKEY_get0_RSA);
469 448
470RSA * 449RSA *
471EVP_PKEY_get1_RSA(EVP_PKEY *pkey) 450EVP_PKEY_get1_RSA(EVP_PKEY *pkey)
@@ -477,7 +456,6 @@ EVP_PKEY_get1_RSA(EVP_PKEY *pkey)
477 RSA_up_ref(pkey->pkey.rsa); 456 RSA_up_ref(pkey->pkey.rsa);
478 return pkey->pkey.rsa; 457 return pkey->pkey.rsa;
479} 458}
480LCRYPTO_ALIAS(EVP_PKEY_get1_RSA);
481 459
482int 460int
483EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) 461EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key)
@@ -487,7 +465,6 @@ EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key)
487 RSA_up_ref(key); 465 RSA_up_ref(key);
488 return ret; 466 return ret;
489} 467}
490LCRYPTO_ALIAS(EVP_PKEY_set1_RSA);
491#endif 468#endif
492 469
493#ifndef OPENSSL_NO_DSA 470#ifndef OPENSSL_NO_DSA
@@ -500,7 +477,6 @@ EVP_PKEY_get0_DSA(EVP_PKEY *pkey)
500 } 477 }
501 return pkey->pkey.dsa; 478 return pkey->pkey.dsa;
502} 479}
503LCRYPTO_ALIAS(EVP_PKEY_get0_DSA);
504 480
505DSA * 481DSA *
506EVP_PKEY_get1_DSA(EVP_PKEY *pkey) 482EVP_PKEY_get1_DSA(EVP_PKEY *pkey)
@@ -512,7 +488,6 @@ EVP_PKEY_get1_DSA(EVP_PKEY *pkey)
512 DSA_up_ref(pkey->pkey.dsa); 488 DSA_up_ref(pkey->pkey.dsa);
513 return pkey->pkey.dsa; 489 return pkey->pkey.dsa;
514} 490}
515LCRYPTO_ALIAS(EVP_PKEY_get1_DSA);
516 491
517int 492int
518EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) 493EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key)
@@ -522,7 +497,6 @@ EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key)
522 DSA_up_ref(key); 497 DSA_up_ref(key);
523 return ret; 498 return ret;
524} 499}
525LCRYPTO_ALIAS(EVP_PKEY_set1_DSA);
526#endif 500#endif
527 501
528#ifndef OPENSSL_NO_EC 502#ifndef OPENSSL_NO_EC
@@ -535,7 +509,6 @@ EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey)
535 } 509 }
536 return pkey->pkey.ec; 510 return pkey->pkey.ec;
537} 511}
538LCRYPTO_ALIAS(EVP_PKEY_get0_EC_KEY);
539 512
540EC_KEY * 513EC_KEY *
541EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) 514EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey)
@@ -547,7 +520,6 @@ EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey)
547 EC_KEY_up_ref(pkey->pkey.ec); 520 EC_KEY_up_ref(pkey->pkey.ec);
548 return pkey->pkey.ec; 521 return pkey->pkey.ec;
549} 522}
550LCRYPTO_ALIAS(EVP_PKEY_get1_EC_KEY);
551 523
552int 524int
553EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) 525EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key)
@@ -557,7 +529,6 @@ EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key)
557 EC_KEY_up_ref(key); 529 EC_KEY_up_ref(key);
558 return ret; 530 return ret;
559} 531}
560LCRYPTO_ALIAS(EVP_PKEY_set1_EC_KEY);
561#endif 532#endif
562 533
563 534
@@ -571,7 +542,6 @@ EVP_PKEY_get0_DH(EVP_PKEY *pkey)
571 } 542 }
572 return pkey->pkey.dh; 543 return pkey->pkey.dh;
573} 544}
574LCRYPTO_ALIAS(EVP_PKEY_get0_DH);
575 545
576DH * 546DH *
577EVP_PKEY_get1_DH(EVP_PKEY *pkey) 547EVP_PKEY_get1_DH(EVP_PKEY *pkey)
@@ -583,7 +553,6 @@ EVP_PKEY_get1_DH(EVP_PKEY *pkey)
583 DH_up_ref(pkey->pkey.dh); 553 DH_up_ref(pkey->pkey.dh);
584 return pkey->pkey.dh; 554 return pkey->pkey.dh;
585} 555}
586LCRYPTO_ALIAS(EVP_PKEY_get1_DH);
587 556
588int 557int
589EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) 558EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key)
@@ -593,7 +562,6 @@ EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key)
593 DH_up_ref(key); 562 DH_up_ref(key);
594 return ret; 563 return ret;
595} 564}
596LCRYPTO_ALIAS(EVP_PKEY_set1_DH);
597#endif 565#endif
598 566
599int 567int
@@ -612,21 +580,18 @@ EVP_PKEY_type(int type)
612#endif 580#endif
613 return ret; 581 return ret;
614} 582}
615LCRYPTO_ALIAS(EVP_PKEY_type);
616 583
617int 584int
618EVP_PKEY_id(const EVP_PKEY *pkey) 585EVP_PKEY_id(const EVP_PKEY *pkey)
619{ 586{
620 return pkey->type; 587 return pkey->type;
621} 588}
622LCRYPTO_ALIAS(EVP_PKEY_id);
623 589
624int 590int
625EVP_PKEY_base_id(const EVP_PKEY *pkey) 591EVP_PKEY_base_id(const EVP_PKEY *pkey)
626{ 592{
627 return EVP_PKEY_type(pkey->type); 593 return EVP_PKEY_type(pkey->type);
628} 594}
629LCRYPTO_ALIAS(EVP_PKEY_base_id);
630 595
631void 596void
632EVP_PKEY_free(EVP_PKEY *x) 597EVP_PKEY_free(EVP_PKEY *x)
@@ -645,7 +610,6 @@ EVP_PKEY_free(EVP_PKEY *x)
645 sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); 610 sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
646 free(x); 611 free(x);
647} 612}
648LCRYPTO_ALIAS(EVP_PKEY_free);
649 613
650static void 614static void
651EVP_PKEY_free_it(EVP_PKEY *x) 615EVP_PKEY_free_it(EVP_PKEY *x)
@@ -679,7 +643,6 @@ EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent,
679 643
680 return unsup_alg(out, pkey, indent, "Public Key"); 644 return unsup_alg(out, pkey, indent, "Public Key");
681} 645}
682LCRYPTO_ALIAS(EVP_PKEY_print_public);
683 646
684int 647int
685EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, 648EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent,
@@ -690,7 +653,6 @@ EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent,
690 653
691 return unsup_alg(out, pkey, indent, "Private Key"); 654 return unsup_alg(out, pkey, indent, "Private Key");
692} 655}
693LCRYPTO_ALIAS(EVP_PKEY_print_private);
694 656
695int 657int
696EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, 658EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent,
@@ -700,7 +662,6 @@ EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent,
700 return pkey->ameth->param_print(out, pkey, indent, pctx); 662 return pkey->ameth->param_print(out, pkey, indent, pctx);
701 return unsup_alg(out, pkey, indent, "Parameters"); 663 return unsup_alg(out, pkey, indent, "Parameters");
702} 664}
703LCRYPTO_ALIAS(EVP_PKEY_print_params);
704 665
705int 666int
706EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) 667EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid)
@@ -710,4 +671,3 @@ EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid)
710 return pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_DEFAULT_MD_NID, 671 return pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_DEFAULT_MD_NID,
711 0, pnid); 672 0, pnid);
712} 673}
713LCRYPTO_ALIAS(EVP_PKEY_get_default_digest_nid);