diff options
| author | beck <> | 2023-07-07 13:54:46 +0000 |
|---|---|---|
| committer | beck <> | 2023-07-07 13:54:46 +0000 |
| commit | f9fcde20a6214da85e802190ccd3a2bf5f891559 (patch) | |
| tree | 8637b2fb4bca234d55b598e035f23335be46ce49 /src/lib/libcrypto/ec | |
| parent | 96c313e4aac4001ae9818efee3f34856cdf873b0 (diff) | |
| download | openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.tar.gz openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.tar.bz2 openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.zip | |
Hide symbols in hkdf, evp, err, ecdsa, and ec
(part 2 of commit)
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/ec')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 25 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_check.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_curve.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_cvt.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_err.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_key.c | 28 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_kmeth.c | 20 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 56 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_oct.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_print.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/eck_prn.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_mont.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 3 |
13 files changed, 157 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 6aedab9774..0435f0a75f 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_asn1.c,v 1.46 2023/06/27 07:28:57 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.47 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -72,6 +72,7 @@ EC_GROUP_get_basis_type(const EC_GROUP *group) | |||
| 72 | { | 72 | { |
| 73 | return 0; | 73 | return 0; |
| 74 | } | 74 | } |
| 75 | LCRYPTO_ALIAS(EC_GROUP_get_basis_type); | ||
| 75 | 76 | ||
| 76 | /* some structures needed for the asn1 encoding */ | 77 | /* some structures needed for the asn1 encoding */ |
| 77 | typedef struct x9_62_pentanomial_st { | 78 | typedef struct x9_62_pentanomial_st { |
| @@ -184,12 +185,14 @@ X9_62_PENTANOMIAL_new(void) | |||
| 184 | { | 185 | { |
| 185 | return (X9_62_PENTANOMIAL*)ASN1_item_new(&X9_62_PENTANOMIAL_it); | 186 | return (X9_62_PENTANOMIAL*)ASN1_item_new(&X9_62_PENTANOMIAL_it); |
| 186 | } | 187 | } |
| 188 | LCRYPTO_ALIAS(X9_62_PENTANOMIAL_new); | ||
| 187 | 189 | ||
| 188 | void | 190 | void |
| 189 | X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a) | 191 | X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a) |
| 190 | { | 192 | { |
| 191 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_PENTANOMIAL_it); | 193 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_PENTANOMIAL_it); |
| 192 | } | 194 | } |
| 195 | LCRYPTO_ALIAS(X9_62_PENTANOMIAL_free); | ||
| 193 | 196 | ||
| 194 | static const ASN1_TEMPLATE char_two_def_tt = { | 197 | static const ASN1_TEMPLATE char_two_def_tt = { |
| 195 | .flags = 0, | 198 | .flags = 0, |
| @@ -284,12 +287,14 @@ X9_62_CHARACTERISTIC_TWO_new(void) | |||
| 284 | { | 287 | { |
| 285 | return (X9_62_CHARACTERISTIC_TWO*)ASN1_item_new(&X9_62_CHARACTERISTIC_TWO_it); | 288 | return (X9_62_CHARACTERISTIC_TWO*)ASN1_item_new(&X9_62_CHARACTERISTIC_TWO_it); |
| 286 | } | 289 | } |
| 290 | LCRYPTO_ALIAS(X9_62_CHARACTERISTIC_TWO_new); | ||
| 287 | 291 | ||
| 288 | void | 292 | void |
| 289 | X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a) | 293 | X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a) |
| 290 | { | 294 | { |
| 291 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_CHARACTERISTIC_TWO_it); | 295 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_CHARACTERISTIC_TWO_it); |
| 292 | } | 296 | } |
| 297 | LCRYPTO_ALIAS(X9_62_CHARACTERISTIC_TWO_free); | ||
| 293 | 298 | ||
| 294 | static const ASN1_TEMPLATE fieldID_def_tt = { | 299 | static const ASN1_TEMPLATE fieldID_def_tt = { |
| 295 | .flags = 0, | 300 | .flags = 0, |
| @@ -455,12 +460,14 @@ ECPARAMETERS_new(void) | |||
| 455 | { | 460 | { |
| 456 | return (ECPARAMETERS*)ASN1_item_new(&ECPARAMETERS_it); | 461 | return (ECPARAMETERS*)ASN1_item_new(&ECPARAMETERS_it); |
| 457 | } | 462 | } |
| 463 | LCRYPTO_ALIAS(ECPARAMETERS_new); | ||
| 458 | 464 | ||
| 459 | void | 465 | void |
| 460 | ECPARAMETERS_free(ECPARAMETERS *a) | 466 | ECPARAMETERS_free(ECPARAMETERS *a) |
| 461 | { | 467 | { |
| 462 | ASN1_item_free((ASN1_VALUE *)a, &ECPARAMETERS_it); | 468 | ASN1_item_free((ASN1_VALUE *)a, &ECPARAMETERS_it); |
| 463 | } | 469 | } |
| 470 | LCRYPTO_ALIAS(ECPARAMETERS_free); | ||
| 464 | 471 | ||
| 465 | static const ASN1_TEMPLATE ECPKPARAMETERS_ch_tt[] = { | 472 | static const ASN1_TEMPLATE ECPKPARAMETERS_ch_tt[] = { |
| 466 | { | 473 | { |
| @@ -507,24 +514,28 @@ d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len) | |||
| 507 | return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 514 | return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 508 | &ECPKPARAMETERS_it); | 515 | &ECPKPARAMETERS_it); |
| 509 | } | 516 | } |
| 517 | LCRYPTO_ALIAS(d2i_ECPKPARAMETERS); | ||
| 510 | 518 | ||
| 511 | int | 519 | int |
| 512 | i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out) | 520 | i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out) |
| 513 | { | 521 | { |
| 514 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECPKPARAMETERS_it); | 522 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECPKPARAMETERS_it); |
| 515 | } | 523 | } |
| 524 | LCRYPTO_ALIAS(i2d_ECPKPARAMETERS); | ||
| 516 | 525 | ||
| 517 | ECPKPARAMETERS * | 526 | ECPKPARAMETERS * |
| 518 | ECPKPARAMETERS_new(void) | 527 | ECPKPARAMETERS_new(void) |
| 519 | { | 528 | { |
| 520 | return (ECPKPARAMETERS *)ASN1_item_new(&ECPKPARAMETERS_it); | 529 | return (ECPKPARAMETERS *)ASN1_item_new(&ECPKPARAMETERS_it); |
| 521 | } | 530 | } |
| 531 | LCRYPTO_ALIAS(ECPKPARAMETERS_new); | ||
| 522 | 532 | ||
| 523 | void | 533 | void |
| 524 | ECPKPARAMETERS_free(ECPKPARAMETERS *a) | 534 | ECPKPARAMETERS_free(ECPKPARAMETERS *a) |
| 525 | { | 535 | { |
| 526 | ASN1_item_free((ASN1_VALUE *)a, &ECPKPARAMETERS_it); | 536 | ASN1_item_free((ASN1_VALUE *)a, &ECPKPARAMETERS_it); |
| 527 | } | 537 | } |
| 538 | LCRYPTO_ALIAS(ECPKPARAMETERS_free); | ||
| 528 | 539 | ||
| 529 | static const ASN1_TEMPLATE EC_PRIVATEKEY_seq_tt[] = { | 540 | static const ASN1_TEMPLATE EC_PRIVATEKEY_seq_tt[] = { |
| 530 | { | 541 | { |
| @@ -578,24 +589,28 @@ d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len) | |||
| 578 | return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 589 | return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
| 579 | &EC_PRIVATEKEY_it); | 590 | &EC_PRIVATEKEY_it); |
| 580 | } | 591 | } |
| 592 | LCRYPTO_ALIAS(d2i_EC_PRIVATEKEY); | ||
| 581 | 593 | ||
| 582 | int | 594 | int |
| 583 | i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out) | 595 | i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out) |
| 584 | { | 596 | { |
| 585 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &EC_PRIVATEKEY_it); | 597 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &EC_PRIVATEKEY_it); |
| 586 | } | 598 | } |
| 599 | LCRYPTO_ALIAS(i2d_EC_PRIVATEKEY); | ||
| 587 | 600 | ||
| 588 | EC_PRIVATEKEY * | 601 | EC_PRIVATEKEY * |
| 589 | EC_PRIVATEKEY_new(void) | 602 | EC_PRIVATEKEY_new(void) |
| 590 | { | 603 | { |
| 591 | return (EC_PRIVATEKEY *)ASN1_item_new(&EC_PRIVATEKEY_it); | 604 | return (EC_PRIVATEKEY *)ASN1_item_new(&EC_PRIVATEKEY_it); |
| 592 | } | 605 | } |
| 606 | LCRYPTO_ALIAS(EC_PRIVATEKEY_new); | ||
| 593 | 607 | ||
| 594 | void | 608 | void |
| 595 | EC_PRIVATEKEY_free(EC_PRIVATEKEY *a) | 609 | EC_PRIVATEKEY_free(EC_PRIVATEKEY *a) |
| 596 | { | 610 | { |
| 597 | ASN1_item_free((ASN1_VALUE *)a, &EC_PRIVATEKEY_it); | 611 | ASN1_item_free((ASN1_VALUE *)a, &EC_PRIVATEKEY_it); |
| 598 | } | 612 | } |
| 613 | LCRYPTO_ALIAS(EC_PRIVATEKEY_free); | ||
| 599 | 614 | ||
| 600 | /* some declarations of internal function */ | 615 | /* some declarations of internal function */ |
| 601 | 616 | ||
| @@ -1101,6 +1116,7 @@ d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len) | |||
| 1101 | ECPKPARAMETERS_free(params); | 1116 | ECPKPARAMETERS_free(params); |
| 1102 | return (group); | 1117 | return (group); |
| 1103 | } | 1118 | } |
| 1119 | LCRYPTO_ALIAS(d2i_ECPKParameters); | ||
| 1104 | 1120 | ||
| 1105 | int | 1121 | int |
| 1106 | i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) | 1122 | i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) |
| @@ -1119,6 +1135,7 @@ i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) | |||
| 1119 | ECPKPARAMETERS_free(tmp); | 1135 | ECPKPARAMETERS_free(tmp); |
| 1120 | return (ret); | 1136 | return (ret); |
| 1121 | } | 1137 | } |
| 1138 | LCRYPTO_ALIAS(i2d_ECPKParameters); | ||
| 1122 | 1139 | ||
| 1123 | /* some EC_KEY functions */ | 1140 | /* some EC_KEY functions */ |
| 1124 | 1141 | ||
| @@ -1213,6 +1230,7 @@ d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len) | |||
| 1213 | 1230 | ||
| 1214 | return (NULL); | 1231 | return (NULL); |
| 1215 | } | 1232 | } |
| 1233 | LCRYPTO_ALIAS(d2i_ECPrivateKey); | ||
| 1216 | 1234 | ||
| 1217 | int | 1235 | int |
| 1218 | i2d_ECPrivateKey(EC_KEY *a, unsigned char **out) | 1236 | i2d_ECPrivateKey(EC_KEY *a, unsigned char **out) |
| @@ -1297,6 +1315,7 @@ i2d_ECPrivateKey(EC_KEY *a, unsigned char **out) | |||
| 1297 | EC_PRIVATEKEY_free(priv_key); | 1315 | EC_PRIVATEKEY_free(priv_key); |
| 1298 | return (ok ? ret : 0); | 1316 | return (ok ? ret : 0); |
| 1299 | } | 1317 | } |
| 1318 | LCRYPTO_ALIAS(i2d_ECPrivateKey); | ||
| 1300 | 1319 | ||
| 1301 | int | 1320 | int |
| 1302 | i2d_ECParameters(EC_KEY *a, unsigned char **out) | 1321 | i2d_ECParameters(EC_KEY *a, unsigned char **out) |
| @@ -1307,6 +1326,7 @@ i2d_ECParameters(EC_KEY *a, unsigned char **out) | |||
| 1307 | } | 1326 | } |
| 1308 | return i2d_ECPKParameters(a->group, out); | 1327 | return i2d_ECPKParameters(a->group, out); |
| 1309 | } | 1328 | } |
| 1329 | LCRYPTO_ALIAS(i2d_ECParameters); | ||
| 1310 | 1330 | ||
| 1311 | EC_KEY * | 1331 | EC_KEY * |
| 1312 | d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) | 1332 | d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) |
| @@ -1336,6 +1356,7 @@ d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) | |||
| 1336 | *a = ret; | 1356 | *a = ret; |
| 1337 | return ret; | 1357 | return ret; |
| 1338 | } | 1358 | } |
| 1359 | LCRYPTO_ALIAS(d2i_ECParameters); | ||
| 1339 | 1360 | ||
| 1340 | EC_KEY * | 1361 | EC_KEY * |
| 1341 | o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len) | 1362 | o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len) |
| @@ -1362,6 +1383,7 @@ o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len) | |||
| 1362 | *in += len; | 1383 | *in += len; |
| 1363 | return ret; | 1384 | return ret; |
| 1364 | } | 1385 | } |
| 1386 | LCRYPTO_ALIAS(o2i_ECPublicKey); | ||
| 1365 | 1387 | ||
| 1366 | int | 1388 | int |
| 1367 | i2o_ECPublicKey(const EC_KEY *a, unsigned char **out) | 1389 | i2o_ECPublicKey(const EC_KEY *a, unsigned char **out) |
| @@ -1400,3 +1422,4 @@ i2o_ECPublicKey(const EC_KEY *a, unsigned char **out) | |||
| 1400 | *out += buf_len; | 1422 | *out += buf_len; |
| 1401 | return buf_len; | 1423 | return buf_len; |
| 1402 | } | 1424 | } |
| 1425 | LCRYPTO_ALIAS(i2o_ECPublicKey); | ||
diff --git a/src/lib/libcrypto/ec/ec_check.c b/src/lib/libcrypto/ec/ec_check.c index 4a38dec539..0f98ef613c 100644 --- a/src/lib/libcrypto/ec/ec_check.c +++ b/src/lib/libcrypto/ec/ec_check.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_check.c,v 1.14 2023/07/03 09:29:55 tb Exp $ */ | 1 | /* $OpenBSD: ec_check.c,v 1.15 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -109,3 +109,4 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) | |||
| 109 | 109 | ||
| 110 | return ret; | 110 | return ret; |
| 111 | } | 111 | } |
| 112 | LCRYPTO_ALIAS(EC_GROUP_check); | ||
diff --git a/src/lib/libcrypto/ec/ec_curve.c b/src/lib/libcrypto/ec/ec_curve.c index a8a1e4d522..9d19628b3e 100644 --- a/src/lib/libcrypto/ec/ec_curve.c +++ b/src/lib/libcrypto/ec/ec_curve.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_curve.c,v 1.41 2023/05/02 13:01:57 tb Exp $ */ | 1 | /* $OpenBSD: ec_curve.c,v 1.42 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -3122,6 +3122,7 @@ EC_GROUP_new_by_curve_name(int nid) | |||
| 3122 | ECerror(EC_R_UNKNOWN_GROUP); | 3122 | ECerror(EC_R_UNKNOWN_GROUP); |
| 3123 | return NULL; | 3123 | return NULL; |
| 3124 | } | 3124 | } |
| 3125 | LCRYPTO_ALIAS(EC_GROUP_new_by_curve_name); | ||
| 3125 | 3126 | ||
| 3126 | size_t | 3127 | size_t |
| 3127 | EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems) | 3128 | EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems) |
| @@ -3140,6 +3141,7 @@ EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems) | |||
| 3140 | 3141 | ||
| 3141 | return CURVE_LIST_LENGTH; | 3142 | return CURVE_LIST_LENGTH; |
| 3142 | } | 3143 | } |
| 3144 | LCRYPTO_ALIAS(EC_get_builtin_curves); | ||
| 3143 | 3145 | ||
| 3144 | static const struct { | 3146 | static const struct { |
| 3145 | const char *name; | 3147 | const char *name; |
| @@ -3174,6 +3176,7 @@ EC_curve_nid2nist(int nid) | |||
| 3174 | 3176 | ||
| 3175 | return NULL; | 3177 | return NULL; |
| 3176 | } | 3178 | } |
| 3179 | LCRYPTO_ALIAS(EC_curve_nid2nist); | ||
| 3177 | 3180 | ||
| 3178 | int | 3181 | int |
| 3179 | EC_curve_nist2nid(const char *name) | 3182 | EC_curve_nist2nid(const char *name) |
| @@ -3187,3 +3190,4 @@ EC_curve_nist2nid(const char *name) | |||
| 3187 | 3190 | ||
| 3188 | return NID_undef; | 3191 | return NID_undef; |
| 3189 | } | 3192 | } |
| 3193 | LCRYPTO_ALIAS(EC_curve_nist2nid); | ||
diff --git a/src/lib/libcrypto/ec/ec_cvt.c b/src/lib/libcrypto/ec/ec_cvt.c index 90e7400739..5b196dd671 100644 --- a/src/lib/libcrypto/ec/ec_cvt.c +++ b/src/lib/libcrypto/ec/ec_cvt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_cvt.c,v 1.11 2023/04/25 19:53:30 tb Exp $ */ | 1 | /* $OpenBSD: ec_cvt.c,v 1.12 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -100,3 +100,4 @@ EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, | |||
| 100 | { | 100 | { |
| 101 | return ec_group_new_curve(EC_GFp_mont_method(), p, a, b, ctx); | 101 | return ec_group_new_curve(EC_GFp_mont_method(), p, a, b, ctx); |
| 102 | } | 102 | } |
| 103 | LCRYPTO_ALIAS(EC_GROUP_new_curve_GFp); | ||
diff --git a/src/lib/libcrypto/ec/ec_err.c b/src/lib/libcrypto/ec/ec_err.c index d10b8e6f7d..d797b937c2 100644 --- a/src/lib/libcrypto/ec/ec_err.c +++ b/src/lib/libcrypto/ec/ec_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_err.c,v 1.16 2023/07/05 17:10:10 tb Exp $ */ | 1 | /* $OpenBSD: ec_err.c,v 1.17 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -147,3 +147,4 @@ ERR_load_EC_strings(void) | |||
| 147 | } | 147 | } |
| 148 | #endif | 148 | #endif |
| 149 | } | 149 | } |
| 150 | LCRYPTO_ALIAS(ERR_load_EC_strings); | ||
diff --git a/src/lib/libcrypto/ec/ec_key.c b/src/lib/libcrypto/ec/ec_key.c index a15d06b019..e5ff189803 100644 --- a/src/lib/libcrypto/ec/ec_key.c +++ b/src/lib/libcrypto/ec/ec_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_key.c,v 1.35 2023/07/05 08:39:40 tb Exp $ */ | 1 | /* $OpenBSD: ec_key.c,v 1.36 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -78,6 +78,7 @@ EC_KEY_new(void) | |||
| 78 | { | 78 | { |
| 79 | return EC_KEY_new_method(NULL); | 79 | return EC_KEY_new_method(NULL); |
| 80 | } | 80 | } |
| 81 | LCRYPTO_ALIAS(EC_KEY_new); | ||
| 81 | 82 | ||
| 82 | EC_KEY * | 83 | EC_KEY * |
| 83 | EC_KEY_new_by_curve_name(int nid) | 84 | EC_KEY_new_by_curve_name(int nid) |
| @@ -97,6 +98,7 @@ EC_KEY_new_by_curve_name(int nid) | |||
| 97 | } | 98 | } |
| 98 | return ret; | 99 | return ret; |
| 99 | } | 100 | } |
| 101 | LCRYPTO_ALIAS(EC_KEY_new_by_curve_name); | ||
| 100 | 102 | ||
| 101 | void | 103 | void |
| 102 | EC_KEY_free(EC_KEY *r) | 104 | EC_KEY_free(EC_KEY *r) |
| @@ -124,6 +126,7 @@ EC_KEY_free(EC_KEY *r) | |||
| 124 | 126 | ||
| 125 | freezero(r, sizeof(EC_KEY)); | 127 | freezero(r, sizeof(EC_KEY)); |
| 126 | } | 128 | } |
| 129 | LCRYPTO_ALIAS(EC_KEY_free); | ||
| 127 | 130 | ||
| 128 | EC_KEY * | 131 | EC_KEY * |
| 129 | EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) | 132 | EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) |
| @@ -197,6 +200,7 @@ EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) | |||
| 197 | 200 | ||
| 198 | return dest; | 201 | return dest; |
| 199 | } | 202 | } |
| 203 | LCRYPTO_ALIAS(EC_KEY_copy); | ||
| 200 | 204 | ||
| 201 | EC_KEY * | 205 | EC_KEY * |
| 202 | EC_KEY_dup(const EC_KEY *ec_key) | 206 | EC_KEY_dup(const EC_KEY *ec_key) |
| @@ -211,6 +215,7 @@ EC_KEY_dup(const EC_KEY *ec_key) | |||
| 211 | } | 215 | } |
| 212 | return ret; | 216 | return ret; |
| 213 | } | 217 | } |
| 218 | LCRYPTO_ALIAS(EC_KEY_dup); | ||
| 214 | 219 | ||
| 215 | int | 220 | int |
| 216 | EC_KEY_up_ref(EC_KEY *r) | 221 | EC_KEY_up_ref(EC_KEY *r) |
| @@ -218,18 +223,21 @@ EC_KEY_up_ref(EC_KEY *r) | |||
| 218 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_EC); | 223 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_EC); |
| 219 | return ((i > 1) ? 1 : 0); | 224 | return ((i > 1) ? 1 : 0); |
| 220 | } | 225 | } |
| 226 | LCRYPTO_ALIAS(EC_KEY_up_ref); | ||
| 221 | 227 | ||
| 222 | int | 228 | int |
| 223 | EC_KEY_set_ex_data(EC_KEY *r, int idx, void *arg) | 229 | EC_KEY_set_ex_data(EC_KEY *r, int idx, void *arg) |
| 224 | { | 230 | { |
| 225 | return CRYPTO_set_ex_data(&r->ex_data, idx, arg); | 231 | return CRYPTO_set_ex_data(&r->ex_data, idx, arg); |
| 226 | } | 232 | } |
| 233 | LCRYPTO_ALIAS(EC_KEY_set_ex_data); | ||
| 227 | 234 | ||
| 228 | void * | 235 | void * |
| 229 | EC_KEY_get_ex_data(const EC_KEY *r, int idx) | 236 | EC_KEY_get_ex_data(const EC_KEY *r, int idx) |
| 230 | { | 237 | { |
| 231 | return CRYPTO_get_ex_data(&r->ex_data, idx); | 238 | return CRYPTO_get_ex_data(&r->ex_data, idx); |
| 232 | } | 239 | } |
| 240 | LCRYPTO_ALIAS(EC_KEY_get_ex_data); | ||
| 233 | 241 | ||
| 234 | int | 242 | int |
| 235 | EC_KEY_generate_key(EC_KEY *eckey) | 243 | EC_KEY_generate_key(EC_KEY *eckey) |
| @@ -239,6 +247,7 @@ EC_KEY_generate_key(EC_KEY *eckey) | |||
| 239 | ECerror(EC_R_NOT_IMPLEMENTED); | 247 | ECerror(EC_R_NOT_IMPLEMENTED); |
| 240 | return 0; | 248 | return 0; |
| 241 | } | 249 | } |
| 250 | LCRYPTO_ALIAS(EC_KEY_generate_key); | ||
| 242 | 251 | ||
| 243 | int | 252 | int |
| 244 | ec_key_gen(EC_KEY *eckey) | 253 | ec_key_gen(EC_KEY *eckey) |
| @@ -355,6 +364,7 @@ EC_KEY_check_key(const EC_KEY *eckey) | |||
| 355 | 364 | ||
| 356 | return ret; | 365 | return ret; |
| 357 | } | 366 | } |
| 367 | LCRYPTO_ALIAS(EC_KEY_check_key); | ||
| 358 | 368 | ||
| 359 | int | 369 | int |
| 360 | EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, BIGNUM *y) | 370 | EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, BIGNUM *y) |
| @@ -409,12 +419,14 @@ EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, BIGNUM *y) | |||
| 409 | 419 | ||
| 410 | return ret; | 420 | return ret; |
| 411 | } | 421 | } |
| 422 | LCRYPTO_ALIAS(EC_KEY_set_public_key_affine_coordinates); | ||
| 412 | 423 | ||
| 413 | const EC_GROUP * | 424 | const EC_GROUP * |
| 414 | EC_KEY_get0_group(const EC_KEY *key) | 425 | EC_KEY_get0_group(const EC_KEY *key) |
| 415 | { | 426 | { |
| 416 | return key->group; | 427 | return key->group; |
| 417 | } | 428 | } |
| 429 | LCRYPTO_ALIAS(EC_KEY_get0_group); | ||
| 418 | 430 | ||
| 419 | int | 431 | int |
| 420 | EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group) | 432 | EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group) |
| @@ -426,12 +438,14 @@ EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group) | |||
| 426 | key->group = EC_GROUP_dup(group); | 438 | key->group = EC_GROUP_dup(group); |
| 427 | return (key->group == NULL) ? 0 : 1; | 439 | return (key->group == NULL) ? 0 : 1; |
| 428 | } | 440 | } |
| 441 | LCRYPTO_ALIAS(EC_KEY_set_group); | ||
| 429 | 442 | ||
| 430 | const BIGNUM * | 443 | const BIGNUM * |
| 431 | EC_KEY_get0_private_key(const EC_KEY *key) | 444 | EC_KEY_get0_private_key(const EC_KEY *key) |
| 432 | { | 445 | { |
| 433 | return key->priv_key; | 446 | return key->priv_key; |
| 434 | } | 447 | } |
| 448 | LCRYPTO_ALIAS(EC_KEY_get0_private_key); | ||
| 435 | 449 | ||
| 436 | int | 450 | int |
| 437 | EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) | 451 | EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) |
| @@ -446,12 +460,14 @@ EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) | |||
| 446 | 460 | ||
| 447 | return 1; | 461 | return 1; |
| 448 | } | 462 | } |
| 463 | LCRYPTO_ALIAS(EC_KEY_set_private_key); | ||
| 449 | 464 | ||
| 450 | const EC_POINT * | 465 | const EC_POINT * |
| 451 | EC_KEY_get0_public_key(const EC_KEY *key) | 466 | EC_KEY_get0_public_key(const EC_KEY *key) |
| 452 | { | 467 | { |
| 453 | return key->pub_key; | 468 | return key->pub_key; |
| 454 | } | 469 | } |
| 470 | LCRYPTO_ALIAS(EC_KEY_get0_public_key); | ||
| 455 | 471 | ||
| 456 | int | 472 | int |
| 457 | EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) | 473 | EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) |
| @@ -466,24 +482,28 @@ EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) | |||
| 466 | 482 | ||
| 467 | return 1; | 483 | return 1; |
| 468 | } | 484 | } |
| 485 | LCRYPTO_ALIAS(EC_KEY_set_public_key); | ||
| 469 | 486 | ||
| 470 | unsigned int | 487 | unsigned int |
| 471 | EC_KEY_get_enc_flags(const EC_KEY *key) | 488 | EC_KEY_get_enc_flags(const EC_KEY *key) |
| 472 | { | 489 | { |
| 473 | return key->enc_flag; | 490 | return key->enc_flag; |
| 474 | } | 491 | } |
| 492 | LCRYPTO_ALIAS(EC_KEY_get_enc_flags); | ||
| 475 | 493 | ||
| 476 | void | 494 | void |
| 477 | EC_KEY_set_enc_flags(EC_KEY *key, unsigned int flags) | 495 | EC_KEY_set_enc_flags(EC_KEY *key, unsigned int flags) |
| 478 | { | 496 | { |
| 479 | key->enc_flag = flags; | 497 | key->enc_flag = flags; |
| 480 | } | 498 | } |
| 499 | LCRYPTO_ALIAS(EC_KEY_set_enc_flags); | ||
| 481 | 500 | ||
| 482 | point_conversion_form_t | 501 | point_conversion_form_t |
| 483 | EC_KEY_get_conv_form(const EC_KEY *key) | 502 | EC_KEY_get_conv_form(const EC_KEY *key) |
| 484 | { | 503 | { |
| 485 | return key->conv_form; | 504 | return key->conv_form; |
| 486 | } | 505 | } |
| 506 | LCRYPTO_ALIAS(EC_KEY_get_conv_form); | ||
| 487 | 507 | ||
| 488 | void | 508 | void |
| 489 | EC_KEY_set_conv_form(EC_KEY *key, point_conversion_form_t cform) | 509 | EC_KEY_set_conv_form(EC_KEY *key, point_conversion_form_t cform) |
| @@ -492,6 +512,7 @@ EC_KEY_set_conv_form(EC_KEY *key, point_conversion_form_t cform) | |||
| 492 | if (key->group != NULL) | 512 | if (key->group != NULL) |
| 493 | EC_GROUP_set_point_conversion_form(key->group, cform); | 513 | EC_GROUP_set_point_conversion_form(key->group, cform); |
| 494 | } | 514 | } |
| 515 | LCRYPTO_ALIAS(EC_KEY_set_conv_form); | ||
| 495 | 516 | ||
| 496 | void | 517 | void |
| 497 | EC_KEY_set_asn1_flag(EC_KEY *key, int flag) | 518 | EC_KEY_set_asn1_flag(EC_KEY *key, int flag) |
| @@ -499,6 +520,7 @@ EC_KEY_set_asn1_flag(EC_KEY *key, int flag) | |||
| 499 | if (key->group != NULL) | 520 | if (key->group != NULL) |
| 500 | EC_GROUP_set_asn1_flag(key->group, flag); | 521 | EC_GROUP_set_asn1_flag(key->group, flag); |
| 501 | } | 522 | } |
| 523 | LCRYPTO_ALIAS(EC_KEY_set_asn1_flag); | ||
| 502 | 524 | ||
| 503 | int | 525 | int |
| 504 | EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx) | 526 | EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx) |
| @@ -507,21 +529,25 @@ EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx) | |||
| 507 | return 0; | 529 | return 0; |
| 508 | return EC_GROUP_precompute_mult(key->group, ctx); | 530 | return EC_GROUP_precompute_mult(key->group, ctx); |
| 509 | } | 531 | } |
| 532 | LCRYPTO_ALIAS(EC_KEY_precompute_mult); | ||
| 510 | 533 | ||
| 511 | int | 534 | int |
| 512 | EC_KEY_get_flags(const EC_KEY *key) | 535 | EC_KEY_get_flags(const EC_KEY *key) |
| 513 | { | 536 | { |
| 514 | return key->flags; | 537 | return key->flags; |
| 515 | } | 538 | } |
| 539 | LCRYPTO_ALIAS(EC_KEY_get_flags); | ||
| 516 | 540 | ||
| 517 | void | 541 | void |
| 518 | EC_KEY_set_flags(EC_KEY *key, int flags) | 542 | EC_KEY_set_flags(EC_KEY *key, int flags) |
| 519 | { | 543 | { |
| 520 | key->flags |= flags; | 544 | key->flags |= flags; |
| 521 | } | 545 | } |
| 546 | LCRYPTO_ALIAS(EC_KEY_set_flags); | ||
| 522 | 547 | ||
| 523 | void | 548 | void |
| 524 | EC_KEY_clear_flags(EC_KEY *key, int flags) | 549 | EC_KEY_clear_flags(EC_KEY *key, int flags) |
| 525 | { | 550 | { |
| 526 | key->flags &= ~flags; | 551 | key->flags &= ~flags; |
| 527 | } | 552 | } |
| 553 | LCRYPTO_ALIAS(EC_KEY_clear_flags); | ||
diff --git a/src/lib/libcrypto/ec/ec_kmeth.c b/src/lib/libcrypto/ec/ec_kmeth.c index ec45e679d9..3e997f8a5e 100644 --- a/src/lib/libcrypto/ec/ec_kmeth.c +++ b/src/lib/libcrypto/ec/ec_kmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_kmeth.c,v 1.10 2023/07/05 11:37:46 tb Exp $ */ | 1 | /* $OpenBSD: ec_kmeth.c,v 1.11 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 4 | * project. | 4 | * project. |
| @@ -92,12 +92,14 @@ EC_KEY_OpenSSL(void) | |||
| 92 | { | 92 | { |
| 93 | return &openssl_ec_key_method; | 93 | return &openssl_ec_key_method; |
| 94 | } | 94 | } |
| 95 | LCRYPTO_ALIAS(EC_KEY_OpenSSL); | ||
| 95 | 96 | ||
| 96 | const EC_KEY_METHOD * | 97 | const EC_KEY_METHOD * |
| 97 | EC_KEY_get_default_method(void) | 98 | EC_KEY_get_default_method(void) |
| 98 | { | 99 | { |
| 99 | return default_ec_key_meth; | 100 | return default_ec_key_meth; |
| 100 | } | 101 | } |
| 102 | LCRYPTO_ALIAS(EC_KEY_get_default_method); | ||
| 101 | 103 | ||
| 102 | void | 104 | void |
| 103 | EC_KEY_set_default_method(const EC_KEY_METHOD *meth) | 105 | EC_KEY_set_default_method(const EC_KEY_METHOD *meth) |
| @@ -107,12 +109,14 @@ EC_KEY_set_default_method(const EC_KEY_METHOD *meth) | |||
| 107 | else | 109 | else |
| 108 | default_ec_key_meth = meth; | 110 | default_ec_key_meth = meth; |
| 109 | } | 111 | } |
| 112 | LCRYPTO_ALIAS(EC_KEY_set_default_method); | ||
| 110 | 113 | ||
| 111 | const EC_KEY_METHOD * | 114 | const EC_KEY_METHOD * |
| 112 | EC_KEY_get_method(const EC_KEY *key) | 115 | EC_KEY_get_method(const EC_KEY *key) |
| 113 | { | 116 | { |
| 114 | return key->meth; | 117 | return key->meth; |
| 115 | } | 118 | } |
| 119 | LCRYPTO_ALIAS(EC_KEY_get_method); | ||
| 116 | 120 | ||
| 117 | int | 121 | int |
| 118 | EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) | 122 | EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) |
| @@ -132,6 +136,7 @@ EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) | |||
| 132 | return meth->init(key); | 136 | return meth->init(key); |
| 133 | return 1; | 137 | return 1; |
| 134 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(EC_KEY_set_method); | ||
| 135 | 140 | ||
| 136 | EC_KEY * | 141 | EC_KEY * |
| 137 | EC_KEY_new_method(ENGINE *engine) | 142 | EC_KEY_new_method(ENGINE *engine) |
| @@ -180,6 +185,7 @@ EC_KEY_new_method(ENGINE *engine) | |||
| 180 | EC_KEY_free(ret); | 185 | EC_KEY_free(ret); |
| 181 | return NULL; | 186 | return NULL; |
| 182 | } | 187 | } |
| 188 | LCRYPTO_ALIAS(EC_KEY_new_method); | ||
| 183 | 189 | ||
| 184 | EC_KEY_METHOD * | 190 | EC_KEY_METHOD * |
| 185 | EC_KEY_METHOD_new(const EC_KEY_METHOD *meth) | 191 | EC_KEY_METHOD_new(const EC_KEY_METHOD *meth) |
| @@ -193,6 +199,7 @@ EC_KEY_METHOD_new(const EC_KEY_METHOD *meth) | |||
| 193 | ret->flags |= EC_KEY_METHOD_DYNAMIC; | 199 | ret->flags |= EC_KEY_METHOD_DYNAMIC; |
| 194 | return ret; | 200 | return ret; |
| 195 | } | 201 | } |
| 202 | LCRYPTO_ALIAS(EC_KEY_METHOD_new); | ||
| 196 | 203 | ||
| 197 | void | 204 | void |
| 198 | EC_KEY_METHOD_free(EC_KEY_METHOD *meth) | 205 | EC_KEY_METHOD_free(EC_KEY_METHOD *meth) |
| @@ -202,6 +209,7 @@ EC_KEY_METHOD_free(EC_KEY_METHOD *meth) | |||
| 202 | if (meth->flags & EC_KEY_METHOD_DYNAMIC) | 209 | if (meth->flags & EC_KEY_METHOD_DYNAMIC) |
| 203 | free(meth); | 210 | free(meth); |
| 204 | } | 211 | } |
| 212 | LCRYPTO_ALIAS(EC_KEY_METHOD_free); | ||
| 205 | 213 | ||
| 206 | void | 214 | void |
| 207 | EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, | 215 | EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, |
| @@ -219,12 +227,14 @@ EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, | |||
| 219 | meth->set_private = set_private; | 227 | meth->set_private = set_private; |
| 220 | meth->set_public = set_public; | 228 | meth->set_public = set_public; |
| 221 | } | 229 | } |
| 230 | LCRYPTO_ALIAS(EC_KEY_METHOD_set_init); | ||
| 222 | 231 | ||
| 223 | void | 232 | void |
| 224 | EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, int (*keygen)(EC_KEY *key)) | 233 | EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, int (*keygen)(EC_KEY *key)) |
| 225 | { | 234 | { |
| 226 | meth->keygen = keygen; | 235 | meth->keygen = keygen; |
| 227 | } | 236 | } |
| 237 | LCRYPTO_ALIAS(EC_KEY_METHOD_set_keygen); | ||
| 228 | 238 | ||
| 229 | void | 239 | void |
| 230 | EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, | 240 | EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, |
| @@ -233,6 +243,7 @@ EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, | |||
| 233 | { | 243 | { |
| 234 | meth->compute_key = ckey; | 244 | meth->compute_key = ckey; |
| 235 | } | 245 | } |
| 246 | LCRYPTO_ALIAS(EC_KEY_METHOD_set_compute_key); | ||
| 236 | 247 | ||
| 237 | void | 248 | void |
| 238 | EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, | 249 | EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, |
| @@ -249,6 +260,7 @@ EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, | |||
| 249 | meth->sign_setup = sign_setup; | 260 | meth->sign_setup = sign_setup; |
| 250 | meth->sign_sig = sign_sig; | 261 | meth->sign_sig = sign_sig; |
| 251 | } | 262 | } |
| 263 | LCRYPTO_ALIAS(EC_KEY_METHOD_set_sign); | ||
| 252 | 264 | ||
| 253 | void | 265 | void |
| 254 | EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, | 266 | EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, |
| @@ -260,6 +272,7 @@ EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, | |||
| 260 | meth->verify = verify; | 272 | meth->verify = verify; |
| 261 | meth->verify_sig = verify_sig; | 273 | meth->verify_sig = verify_sig; |
| 262 | } | 274 | } |
| 275 | LCRYPTO_ALIAS(EC_KEY_METHOD_set_verify); | ||
| 263 | 276 | ||
| 264 | 277 | ||
| 265 | void | 278 | void |
| @@ -284,6 +297,7 @@ EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth, | |||
| 284 | if (pset_public != NULL) | 297 | if (pset_public != NULL) |
| 285 | *pset_public = meth->set_public; | 298 | *pset_public = meth->set_public; |
| 286 | } | 299 | } |
| 300 | LCRYPTO_ALIAS(EC_KEY_METHOD_get_init); | ||
| 287 | 301 | ||
| 288 | void | 302 | void |
| 289 | EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, | 303 | EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, |
| @@ -292,6 +306,7 @@ EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, | |||
| 292 | if (pkeygen != NULL) | 306 | if (pkeygen != NULL) |
| 293 | *pkeygen = meth->keygen; | 307 | *pkeygen = meth->keygen; |
| 294 | } | 308 | } |
| 309 | LCRYPTO_ALIAS(EC_KEY_METHOD_get_keygen); | ||
| 295 | 310 | ||
| 296 | void | 311 | void |
| 297 | EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, | 312 | EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, |
| @@ -301,6 +316,7 @@ EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, | |||
| 301 | if (pck != NULL) | 316 | if (pck != NULL) |
| 302 | *pck = meth->compute_key; | 317 | *pck = meth->compute_key; |
| 303 | } | 318 | } |
| 319 | LCRYPTO_ALIAS(EC_KEY_METHOD_get_compute_key); | ||
| 304 | 320 | ||
| 305 | void | 321 | void |
| 306 | EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, | 322 | EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, |
| @@ -320,6 +336,7 @@ EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, | |||
| 320 | if (psign_sig != NULL) | 336 | if (psign_sig != NULL) |
| 321 | *psign_sig = meth->sign_sig; | 337 | *psign_sig = meth->sign_sig; |
| 322 | } | 338 | } |
| 339 | LCRYPTO_ALIAS(EC_KEY_METHOD_get_sign); | ||
| 323 | 340 | ||
| 324 | void | 341 | void |
| 325 | EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, | 342 | EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, |
| @@ -333,3 +350,4 @@ EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, | |||
| 333 | if (pverify_sig != NULL) | 350 | if (pverify_sig != NULL) |
| 334 | *pverify_sig = meth->verify_sig; | 351 | *pverify_sig = meth->verify_sig; |
| 335 | } | 352 | } |
| 353 | LCRYPTO_ALIAS(EC_KEY_METHOD_get_verify); | ||
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 8cea0bb95b..3db1ca2f07 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_lib.c,v 1.62 2023/07/03 07:26:40 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.63 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -110,6 +110,7 @@ EC_GROUP_new(const EC_METHOD *meth) | |||
| 110 | } | 110 | } |
| 111 | return ret; | 111 | return ret; |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EC_GROUP_new); | ||
| 113 | 114 | ||
| 114 | 115 | ||
| 115 | void | 116 | void |
| @@ -128,12 +129,14 @@ EC_GROUP_free(EC_GROUP *group) | |||
| 128 | freezero(group->seed, group->seed_len); | 129 | freezero(group->seed, group->seed_len); |
| 129 | freezero(group, sizeof *group); | 130 | freezero(group, sizeof *group); |
| 130 | } | 131 | } |
| 132 | LCRYPTO_ALIAS(EC_GROUP_free); | ||
| 131 | 133 | ||
| 132 | void | 134 | void |
| 133 | EC_GROUP_clear_free(EC_GROUP *group) | 135 | EC_GROUP_clear_free(EC_GROUP *group) |
| 134 | { | 136 | { |
| 135 | EC_GROUP_free(group); | 137 | EC_GROUP_free(group); |
| 136 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(EC_GROUP_clear_free); | ||
| 137 | 140 | ||
| 138 | int | 141 | int |
| 139 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) | 142 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) |
| @@ -188,6 +191,7 @@ EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) | |||
| 188 | 191 | ||
| 189 | return dest->meth->group_copy(dest, src); | 192 | return dest->meth->group_copy(dest, src); |
| 190 | } | 193 | } |
| 194 | LCRYPTO_ALIAS(EC_GROUP_copy); | ||
| 191 | 195 | ||
| 192 | 196 | ||
| 193 | EC_GROUP * | 197 | EC_GROUP * |
| @@ -202,6 +206,7 @@ EC_GROUP_dup(const EC_GROUP *a) | |||
| 202 | } | 206 | } |
| 203 | return t; | 207 | return t; |
| 204 | } | 208 | } |
| 209 | LCRYPTO_ALIAS(EC_GROUP_dup); | ||
| 205 | 210 | ||
| 206 | 211 | ||
| 207 | const EC_METHOD * | 212 | const EC_METHOD * |
| @@ -209,6 +214,7 @@ EC_GROUP_method_of(const EC_GROUP *group) | |||
| 209 | { | 214 | { |
| 210 | return group->meth; | 215 | return group->meth; |
| 211 | } | 216 | } |
| 217 | LCRYPTO_ALIAS(EC_GROUP_method_of); | ||
| 212 | 218 | ||
| 213 | 219 | ||
| 214 | int | 220 | int |
| @@ -216,6 +222,7 @@ EC_METHOD_get_field_type(const EC_METHOD *meth) | |||
| 216 | { | 222 | { |
| 217 | return meth->field_type; | 223 | return meth->field_type; |
| 218 | } | 224 | } |
| 225 | LCRYPTO_ALIAS(EC_METHOD_get_field_type); | ||
| 219 | 226 | ||
| 220 | /* | 227 | /* |
| 221 | * If there is a user-provided cofactor, sanity check and use it. Otherwise | 228 | * If there is a user-provided cofactor, sanity check and use it. Otherwise |
| @@ -349,6 +356,7 @@ EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, | |||
| 349 | 356 | ||
| 350 | return 1; | 357 | return 1; |
| 351 | } | 358 | } |
| 359 | LCRYPTO_ALIAS(EC_GROUP_set_generator); | ||
| 352 | 360 | ||
| 353 | 361 | ||
| 354 | const EC_POINT * | 362 | const EC_POINT * |
| @@ -356,6 +364,7 @@ EC_GROUP_get0_generator(const EC_GROUP *group) | |||
| 356 | { | 364 | { |
| 357 | return group->generator; | 365 | return group->generator; |
| 358 | } | 366 | } |
| 367 | LCRYPTO_ALIAS(EC_GROUP_get0_generator); | ||
| 359 | 368 | ||
| 360 | int | 369 | int |
| 361 | EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) | 370 | EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) |
| @@ -365,6 +374,7 @@ EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) | |||
| 365 | 374 | ||
| 366 | return !BN_is_zero(order); | 375 | return !BN_is_zero(order); |
| 367 | } | 376 | } |
| 377 | LCRYPTO_ALIAS(EC_GROUP_get_order); | ||
| 368 | 378 | ||
| 369 | const BIGNUM * | 379 | const BIGNUM * |
| 370 | EC_GROUP_get0_order(const EC_GROUP *group) | 380 | EC_GROUP_get0_order(const EC_GROUP *group) |
| @@ -377,6 +387,7 @@ EC_GROUP_order_bits(const EC_GROUP *group) | |||
| 377 | { | 387 | { |
| 378 | return group->meth->group_order_bits(group); | 388 | return group->meth->group_order_bits(group); |
| 379 | } | 389 | } |
| 390 | LCRYPTO_ALIAS(EC_GROUP_order_bits); | ||
| 380 | 391 | ||
| 381 | int | 392 | int |
| 382 | EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) | 393 | EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) |
| @@ -386,6 +397,7 @@ EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) | |||
| 386 | 397 | ||
| 387 | return !BN_is_zero(&group->cofactor); | 398 | return !BN_is_zero(&group->cofactor); |
| 388 | } | 399 | } |
| 400 | LCRYPTO_ALIAS(EC_GROUP_get_cofactor); | ||
| 389 | 401 | ||
| 390 | 402 | ||
| 391 | void | 403 | void |
| @@ -393,6 +405,7 @@ EC_GROUP_set_curve_name(EC_GROUP *group, int nid) | |||
| 393 | { | 405 | { |
| 394 | group->curve_name = nid; | 406 | group->curve_name = nid; |
| 395 | } | 407 | } |
| 408 | LCRYPTO_ALIAS(EC_GROUP_set_curve_name); | ||
| 396 | 409 | ||
| 397 | 410 | ||
| 398 | int | 411 | int |
| @@ -400,6 +413,7 @@ EC_GROUP_get_curve_name(const EC_GROUP *group) | |||
| 400 | { | 413 | { |
| 401 | return group->curve_name; | 414 | return group->curve_name; |
| 402 | } | 415 | } |
| 416 | LCRYPTO_ALIAS(EC_GROUP_get_curve_name); | ||
| 403 | 417 | ||
| 404 | 418 | ||
| 405 | void | 419 | void |
| @@ -407,6 +421,7 @@ EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag) | |||
| 407 | { | 421 | { |
| 408 | group->asn1_flag = flag; | 422 | group->asn1_flag = flag; |
| 409 | } | 423 | } |
| 424 | LCRYPTO_ALIAS(EC_GROUP_set_asn1_flag); | ||
| 410 | 425 | ||
| 411 | 426 | ||
| 412 | int | 427 | int |
| @@ -414,6 +429,7 @@ EC_GROUP_get_asn1_flag(const EC_GROUP *group) | |||
| 414 | { | 429 | { |
| 415 | return group->asn1_flag; | 430 | return group->asn1_flag; |
| 416 | } | 431 | } |
| 432 | LCRYPTO_ALIAS(EC_GROUP_get_asn1_flag); | ||
| 417 | 433 | ||
| 418 | 434 | ||
| 419 | void | 435 | void |
| @@ -422,6 +438,7 @@ EC_GROUP_set_point_conversion_form(EC_GROUP *group, | |||
| 422 | { | 438 | { |
| 423 | group->asn1_form = form; | 439 | group->asn1_form = form; |
| 424 | } | 440 | } |
| 441 | LCRYPTO_ALIAS(EC_GROUP_set_point_conversion_form); | ||
| 425 | 442 | ||
| 426 | 443 | ||
| 427 | point_conversion_form_t | 444 | point_conversion_form_t |
| @@ -429,6 +446,7 @@ EC_GROUP_get_point_conversion_form(const EC_GROUP *group) | |||
| 429 | { | 446 | { |
| 430 | return group->asn1_form; | 447 | return group->asn1_form; |
| 431 | } | 448 | } |
| 449 | LCRYPTO_ALIAS(EC_GROUP_get_point_conversion_form); | ||
| 432 | 450 | ||
| 433 | 451 | ||
| 434 | size_t | 452 | size_t |
| @@ -449,6 +467,7 @@ EC_GROUP_set_seed(EC_GROUP *group, const unsigned char *p, size_t len) | |||
| 449 | 467 | ||
| 450 | return len; | 468 | return len; |
| 451 | } | 469 | } |
| 470 | LCRYPTO_ALIAS(EC_GROUP_set_seed); | ||
| 452 | 471 | ||
| 453 | 472 | ||
| 454 | unsigned char * | 473 | unsigned char * |
| @@ -456,6 +475,7 @@ EC_GROUP_get0_seed(const EC_GROUP *group) | |||
| 456 | { | 475 | { |
| 457 | return group->seed; | 476 | return group->seed; |
| 458 | } | 477 | } |
| 478 | LCRYPTO_ALIAS(EC_GROUP_get0_seed); | ||
| 459 | 479 | ||
| 460 | 480 | ||
| 461 | size_t | 481 | size_t |
| @@ -463,6 +483,7 @@ EC_GROUP_get_seed_len(const EC_GROUP *group) | |||
| 463 | { | 483 | { |
| 464 | return group->seed_len; | 484 | return group->seed_len; |
| 465 | } | 485 | } |
| 486 | LCRYPTO_ALIAS(EC_GROUP_get_seed_len); | ||
| 466 | 487 | ||
| 467 | int | 488 | int |
| 468 | EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | 489 | EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, |
| @@ -488,6 +509,7 @@ EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 488 | 509 | ||
| 489 | return ret; | 510 | return ret; |
| 490 | } | 511 | } |
| 512 | LCRYPTO_ALIAS(EC_GROUP_set_curve); | ||
| 491 | 513 | ||
| 492 | int | 514 | int |
| 493 | EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | 515 | EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, |
| @@ -513,6 +535,7 @@ EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | |||
| 513 | 535 | ||
| 514 | return ret; | 536 | return ret; |
| 515 | } | 537 | } |
| 538 | LCRYPTO_ALIAS(EC_GROUP_get_curve); | ||
| 516 | 539 | ||
| 517 | int | 540 | int |
| 518 | EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | 541 | EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, |
| @@ -520,6 +543,7 @@ EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 520 | { | 543 | { |
| 521 | return EC_GROUP_set_curve(group, p, a, b, ctx); | 544 | return EC_GROUP_set_curve(group, p, a, b, ctx); |
| 522 | } | 545 | } |
| 546 | LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp); | ||
| 523 | 547 | ||
| 524 | int | 548 | int |
| 525 | EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | 549 | EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, |
| @@ -527,6 +551,7 @@ EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | |||
| 527 | { | 551 | { |
| 528 | return EC_GROUP_get_curve(group, p, a, b, ctx); | 552 | return EC_GROUP_get_curve(group, p, a, b, ctx); |
| 529 | } | 553 | } |
| 554 | LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp); | ||
| 530 | 555 | ||
| 531 | int | 556 | int |
| 532 | EC_GROUP_get_degree(const EC_GROUP *group) | 557 | EC_GROUP_get_degree(const EC_GROUP *group) |
| @@ -537,6 +562,7 @@ EC_GROUP_get_degree(const EC_GROUP *group) | |||
| 537 | } | 562 | } |
| 538 | return group->meth->group_get_degree(group); | 563 | return group->meth->group_get_degree(group); |
| 539 | } | 564 | } |
| 565 | LCRYPTO_ALIAS(EC_GROUP_get_degree); | ||
| 540 | 566 | ||
| 541 | 567 | ||
| 542 | int | 568 | int |
| @@ -562,6 +588,7 @@ EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx_in) | |||
| 562 | 588 | ||
| 563 | return ret; | 589 | return ret; |
| 564 | } | 590 | } |
| 591 | LCRYPTO_ALIAS(EC_GROUP_check_discriminant); | ||
| 565 | 592 | ||
| 566 | 593 | ||
| 567 | int | 594 | int |
| @@ -637,6 +664,7 @@ EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx) | |||
| 637 | BN_CTX_free(ctx); | 664 | BN_CTX_free(ctx); |
| 638 | return -1; | 665 | return -1; |
| 639 | } | 666 | } |
| 667 | LCRYPTO_ALIAS(EC_GROUP_cmp); | ||
| 640 | 668 | ||
| 641 | /* | 669 | /* |
| 642 | * Coordinate blinding for EC_POINT. | 670 | * Coordinate blinding for EC_POINT. |
| @@ -682,6 +710,7 @@ EC_POINT_new(const EC_GROUP *group) | |||
| 682 | } | 710 | } |
| 683 | return ret; | 711 | return ret; |
| 684 | } | 712 | } |
| 713 | LCRYPTO_ALIAS(EC_POINT_new); | ||
| 685 | 714 | ||
| 686 | void | 715 | void |
| 687 | EC_POINT_free(EC_POINT *point) | 716 | EC_POINT_free(EC_POINT *point) |
| @@ -694,12 +723,14 @@ EC_POINT_free(EC_POINT *point) | |||
| 694 | 723 | ||
| 695 | freezero(point, sizeof *point); | 724 | freezero(point, sizeof *point); |
| 696 | } | 725 | } |
| 726 | LCRYPTO_ALIAS(EC_POINT_free); | ||
| 697 | 727 | ||
| 698 | void | 728 | void |
| 699 | EC_POINT_clear_free(EC_POINT *point) | 729 | EC_POINT_clear_free(EC_POINT *point) |
| 700 | { | 730 | { |
| 701 | EC_POINT_free(point); | 731 | EC_POINT_free(point); |
| 702 | } | 732 | } |
| 733 | LCRYPTO_ALIAS(EC_POINT_clear_free); | ||
| 703 | 734 | ||
| 704 | int | 735 | int |
| 705 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) | 736 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) |
| @@ -716,6 +747,7 @@ EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) | |||
| 716 | return 1; | 747 | return 1; |
| 717 | return dest->meth->point_copy(dest, src); | 748 | return dest->meth->point_copy(dest, src); |
| 718 | } | 749 | } |
| 750 | LCRYPTO_ALIAS(EC_POINT_copy); | ||
| 719 | 751 | ||
| 720 | EC_POINT * | 752 | EC_POINT * |
| 721 | EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group) | 753 | EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group) |
| @@ -736,12 +768,14 @@ EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group) | |||
| 736 | } else | 768 | } else |
| 737 | return t; | 769 | return t; |
| 738 | } | 770 | } |
| 771 | LCRYPTO_ALIAS(EC_POINT_dup); | ||
| 739 | 772 | ||
| 740 | const EC_METHOD * | 773 | const EC_METHOD * |
| 741 | EC_POINT_method_of(const EC_POINT *point) | 774 | EC_POINT_method_of(const EC_POINT *point) |
| 742 | { | 775 | { |
| 743 | return point->meth; | 776 | return point->meth; |
| 744 | } | 777 | } |
| 778 | LCRYPTO_ALIAS(EC_POINT_method_of); | ||
| 745 | 779 | ||
| 746 | int | 780 | int |
| 747 | EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point) | 781 | EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point) |
| @@ -756,6 +790,7 @@ EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point) | |||
| 756 | } | 790 | } |
| 757 | return group->meth->point_set_to_infinity(group, point); | 791 | return group->meth->point_set_to_infinity(group, point); |
| 758 | } | 792 | } |
| 793 | LCRYPTO_ALIAS(EC_POINT_set_to_infinity); | ||
| 759 | 794 | ||
| 760 | int | 795 | int |
| 761 | EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *point, | 796 | EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *point, |
| @@ -831,6 +866,7 @@ EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
| 831 | { | 866 | { |
| 832 | return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx); | 867 | return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx); |
| 833 | } | 868 | } |
| 869 | LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp); | ||
| 834 | 870 | ||
| 835 | int | 871 | int |
| 836 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | 872 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, |
| @@ -838,6 +874,7 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | |||
| 838 | { | 874 | { |
| 839 | return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx); | 875 | return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx); |
| 840 | } | 876 | } |
| 877 | LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp); | ||
| 841 | 878 | ||
| 842 | int | 879 | int |
| 843 | EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, | 880 | EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, |
| @@ -875,6 +912,7 @@ EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, | |||
| 875 | 912 | ||
| 876 | return ret; | 913 | return ret; |
| 877 | } | 914 | } |
| 915 | LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates); | ||
| 878 | 916 | ||
| 879 | int | 917 | int |
| 880 | EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | 918 | EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, |
| @@ -882,6 +920,7 @@ EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
| 882 | { | 920 | { |
| 883 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); | 921 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); |
| 884 | } | 922 | } |
| 923 | LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp); | ||
| 885 | 924 | ||
| 886 | int | 925 | int |
| 887 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, | 926 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, |
| @@ -911,6 +950,7 @@ EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, | |||
| 911 | 950 | ||
| 912 | return ret; | 951 | return ret; |
| 913 | } | 952 | } |
| 953 | LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates); | ||
| 914 | 954 | ||
| 915 | int | 955 | int |
| 916 | EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, | 956 | EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, |
| @@ -918,6 +958,7 @@ EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point | |||
| 918 | { | 958 | { |
| 919 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); | 959 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); |
| 920 | } | 960 | } |
| 961 | LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp); | ||
| 921 | 962 | ||
| 922 | int | 963 | int |
| 923 | EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | 964 | EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, |
| @@ -948,6 +989,7 @@ EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | |||
| 948 | 989 | ||
| 949 | return ret; | 990 | return ret; |
| 950 | } | 991 | } |
| 992 | LCRYPTO_ALIAS(EC_POINT_add); | ||
| 951 | 993 | ||
| 952 | int | 994 | int |
| 953 | EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | 995 | EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, |
| @@ -977,6 +1019,7 @@ EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | |||
| 977 | 1019 | ||
| 978 | return ret; | 1020 | return ret; |
| 979 | } | 1021 | } |
| 1022 | LCRYPTO_ALIAS(EC_POINT_dbl); | ||
| 980 | 1023 | ||
| 981 | int | 1024 | int |
| 982 | EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx_in) | 1025 | EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx_in) |
| @@ -1005,6 +1048,7 @@ EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx_in) | |||
| 1005 | 1048 | ||
| 1006 | return ret; | 1049 | return ret; |
| 1007 | } | 1050 | } |
| 1051 | LCRYPTO_ALIAS(EC_POINT_invert); | ||
| 1008 | 1052 | ||
| 1009 | int | 1053 | int |
| 1010 | EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) | 1054 | EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) |
| @@ -1019,6 +1063,7 @@ EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) | |||
| 1019 | } | 1063 | } |
| 1020 | return group->meth->is_at_infinity(group, point); | 1064 | return group->meth->is_at_infinity(group, point); |
| 1021 | } | 1065 | } |
| 1066 | LCRYPTO_ALIAS(EC_POINT_is_at_infinity); | ||
| 1022 | 1067 | ||
| 1023 | int | 1068 | int |
| 1024 | EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, | 1069 | EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, |
| @@ -1048,6 +1093,7 @@ EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, | |||
| 1048 | 1093 | ||
| 1049 | return ret; | 1094 | return ret; |
| 1050 | } | 1095 | } |
| 1096 | LCRYPTO_ALIAS(EC_POINT_is_on_curve); | ||
| 1051 | 1097 | ||
| 1052 | int | 1098 | int |
| 1053 | EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, | 1099 | EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, |
| @@ -1077,6 +1123,7 @@ EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, | |||
| 1077 | 1123 | ||
| 1078 | return ret; | 1124 | return ret; |
| 1079 | } | 1125 | } |
| 1126 | LCRYPTO_ALIAS(EC_POINT_cmp); | ||
| 1080 | 1127 | ||
| 1081 | int | 1128 | int |
| 1082 | EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx_in) | 1129 | EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx_in) |
| @@ -1105,6 +1152,7 @@ EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx_in) | |||
| 1105 | 1152 | ||
| 1106 | return ret; | 1153 | return ret; |
| 1107 | } | 1154 | } |
| 1155 | LCRYPTO_ALIAS(EC_POINT_make_affine); | ||
| 1108 | 1156 | ||
| 1109 | int | 1157 | int |
| 1110 | EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], | 1158 | EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], |
| @@ -1137,6 +1185,7 @@ EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], | |||
| 1137 | 1185 | ||
| 1138 | return ret; | 1186 | return ret; |
| 1139 | } | 1187 | } |
| 1188 | LCRYPTO_ALIAS(EC_POINTs_make_affine); | ||
| 1140 | 1189 | ||
| 1141 | int | 1190 | int |
| 1142 | EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | 1191 | EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, |
| @@ -1178,6 +1227,7 @@ EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | |||
| 1178 | 1227 | ||
| 1179 | return ret; | 1228 | return ret; |
| 1180 | } | 1229 | } |
| 1230 | LCRYPTO_ALIAS(EC_POINTs_mul); | ||
| 1181 | 1231 | ||
| 1182 | int | 1232 | int |
| 1183 | EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, | 1233 | EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, |
| @@ -1239,18 +1289,21 @@ EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, | |||
| 1239 | 1289 | ||
| 1240 | return ret; | 1290 | return ret; |
| 1241 | } | 1291 | } |
| 1292 | LCRYPTO_ALIAS(EC_POINT_mul); | ||
| 1242 | 1293 | ||
| 1243 | int | 1294 | int |
| 1244 | EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in) | 1295 | EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in) |
| 1245 | { | 1296 | { |
| 1246 | return 1; | 1297 | return 1; |
| 1247 | } | 1298 | } |
| 1299 | LCRYPTO_ALIAS(EC_GROUP_precompute_mult); | ||
| 1248 | 1300 | ||
| 1249 | int | 1301 | int |
| 1250 | EC_GROUP_have_precompute_mult(const EC_GROUP *group) | 1302 | EC_GROUP_have_precompute_mult(const EC_GROUP *group) |
| 1251 | { | 1303 | { |
| 1252 | return 0; | 1304 | return 0; |
| 1253 | } | 1305 | } |
| 1306 | LCRYPTO_ALIAS(EC_GROUP_have_precompute_mult); | ||
| 1254 | 1307 | ||
| 1255 | int | 1308 | int |
| 1256 | ec_group_simple_order_bits(const EC_GROUP *group) | 1309 | ec_group_simple_order_bits(const EC_GROUP *group) |
| @@ -1283,3 +1336,4 @@ ECParameters_dup(EC_KEY *key) | |||
| 1283 | 1336 | ||
| 1284 | return dup; | 1337 | return dup; |
| 1285 | } | 1338 | } |
| 1339 | LCRYPTO_ALIAS(ECParameters_dup); | ||
diff --git a/src/lib/libcrypto/ec/ec_oct.c b/src/lib/libcrypto/ec/ec_oct.c index f9de2f13a1..b9bc62a4e3 100644 --- a/src/lib/libcrypto/ec/ec_oct.c +++ b/src/lib/libcrypto/ec/ec_oct.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_oct.c,v 1.14 2023/05/04 06:45:51 tb Exp $ */ | 1 | /* $OpenBSD: ec_oct.c,v 1.15 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -99,6 +99,7 @@ EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point, | |||
| 99 | 99 | ||
| 100 | return ret; | 100 | return ret; |
| 101 | } | 101 | } |
| 102 | LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates); | ||
| 102 | 103 | ||
| 103 | int | 104 | int |
| 104 | EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | 105 | EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, |
| @@ -106,6 +107,7 @@ EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
| 106 | { | 107 | { |
| 107 | return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx); | 108 | return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx); |
| 108 | } | 109 | } |
| 110 | LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates_GFp); | ||
| 109 | 111 | ||
| 110 | size_t | 112 | size_t |
| 111 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, | 113 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, |
| @@ -136,6 +138,7 @@ EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, | |||
| 136 | 138 | ||
| 137 | return ret; | 139 | return ret; |
| 138 | } | 140 | } |
| 141 | LCRYPTO_ALIAS(EC_POINT_point2oct); | ||
| 139 | 142 | ||
| 140 | int | 143 | int |
| 141 | EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point, | 144 | EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point, |
| @@ -165,3 +168,4 @@ EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point, | |||
| 165 | 168 | ||
| 166 | return ret; | 169 | return ret; |
| 167 | } | 170 | } |
| 171 | LCRYPTO_ALIAS(EC_POINT_oct2point); | ||
diff --git a/src/lib/libcrypto/ec/ec_print.c b/src/lib/libcrypto/ec/ec_print.c index da33c4eccd..312770f66c 100644 --- a/src/lib/libcrypto/ec/ec_print.c +++ b/src/lib/libcrypto/ec/ec_print.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_print.c,v 1.12 2023/06/23 10:34:16 tb Exp $ */ | 1 | /* $OpenBSD: ec_print.c,v 1.13 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -81,6 +81,7 @@ EC_POINT_point2bn(const EC_GROUP *group, const EC_POINT *point, | |||
| 81 | 81 | ||
| 82 | return ret; | 82 | return ret; |
| 83 | } | 83 | } |
| 84 | LCRYPTO_ALIAS(EC_POINT_point2bn); | ||
| 84 | 85 | ||
| 85 | EC_POINT * | 86 | EC_POINT * |
| 86 | EC_POINT_bn2point(const EC_GROUP *group, | 87 | EC_POINT_bn2point(const EC_GROUP *group, |
| @@ -117,6 +118,7 @@ EC_POINT_bn2point(const EC_GROUP *group, | |||
| 117 | free(buf); | 118 | free(buf); |
| 118 | return ret; | 119 | return ret; |
| 119 | } | 120 | } |
| 121 | LCRYPTO_ALIAS(EC_POINT_bn2point); | ||
| 120 | 122 | ||
| 121 | static const char *HEX_DIGITS = "0123456789ABCDEF"; | 123 | static const char *HEX_DIGITS = "0123456789ABCDEF"; |
| 122 | 124 | ||
| @@ -159,6 +161,7 @@ EC_POINT_point2hex(const EC_GROUP *group, const EC_POINT *point, | |||
| 159 | 161 | ||
| 160 | return ret; | 162 | return ret; |
| 161 | } | 163 | } |
| 164 | LCRYPTO_ALIAS(EC_POINT_point2hex); | ||
| 162 | 165 | ||
| 163 | EC_POINT * | 166 | EC_POINT * |
| 164 | EC_POINT_hex2point(const EC_GROUP *group, const char *buf, | 167 | EC_POINT_hex2point(const EC_GROUP *group, const char *buf, |
| @@ -176,3 +179,4 @@ EC_POINT_hex2point(const EC_GROUP *group, const char *buf, | |||
| 176 | 179 | ||
| 177 | return ret; | 180 | return ret; |
| 178 | } | 181 | } |
| 182 | LCRYPTO_ALIAS(EC_POINT_hex2point); | ||
diff --git a/src/lib/libcrypto/ec/eck_prn.c b/src/lib/libcrypto/ec/eck_prn.c index f65b74518b..6e89bfa739 100644 --- a/src/lib/libcrypto/ec/eck_prn.c +++ b/src/lib/libcrypto/ec/eck_prn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eck_prn.c,v 1.27 2023/07/06 15:18:02 tb Exp $ */ | 1 | /* $OpenBSD: eck_prn.c,v 1.28 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -86,6 +86,7 @@ ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off) | |||
| 86 | BIO_free(b); | 86 | BIO_free(b); |
| 87 | return (ret); | 87 | return (ret); |
| 88 | } | 88 | } |
| 89 | LCRYPTO_ALIAS(ECPKParameters_print_fp); | ||
| 89 | 90 | ||
| 90 | int | 91 | int |
| 91 | EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off) | 92 | EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off) |
| @@ -102,6 +103,7 @@ EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off) | |||
| 102 | BIO_free(b); | 103 | BIO_free(b); |
| 103 | return (ret); | 104 | return (ret); |
| 104 | } | 105 | } |
| 106 | LCRYPTO_ALIAS(EC_KEY_print_fp); | ||
| 105 | 107 | ||
| 106 | int | 108 | int |
| 107 | ECParameters_print_fp(FILE *fp, const EC_KEY *x) | 109 | ECParameters_print_fp(FILE *fp, const EC_KEY *x) |
| @@ -118,6 +120,7 @@ ECParameters_print_fp(FILE *fp, const EC_KEY *x) | |||
| 118 | BIO_free(b); | 120 | BIO_free(b); |
| 119 | return (ret); | 121 | return (ret); |
| 120 | } | 122 | } |
| 123 | LCRYPTO_ALIAS(ECParameters_print_fp); | ||
| 121 | 124 | ||
| 122 | int | 125 | int |
| 123 | EC_KEY_print(BIO *bp, const EC_KEY *x, int off) | 126 | EC_KEY_print(BIO *bp, const EC_KEY *x, int off) |
| @@ -136,6 +139,7 @@ EC_KEY_print(BIO *bp, const EC_KEY *x, int off) | |||
| 136 | EVP_PKEY_free(pk); | 139 | EVP_PKEY_free(pk); |
| 137 | return ret; | 140 | return ret; |
| 138 | } | 141 | } |
| 142 | LCRYPTO_ALIAS(EC_KEY_print); | ||
| 139 | 143 | ||
| 140 | int | 144 | int |
| 141 | ECParameters_print(BIO *bp, const EC_KEY *x) | 145 | ECParameters_print(BIO *bp, const EC_KEY *x) |
| @@ -154,6 +158,7 @@ ECParameters_print(BIO *bp, const EC_KEY *x) | |||
| 154 | EVP_PKEY_free(pk); | 158 | EVP_PKEY_free(pk); |
| 155 | return ret; | 159 | return ret; |
| 156 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(ECParameters_print); | ||
| 157 | 162 | ||
| 158 | static int | 163 | static int |
| 159 | print_bin(BIO *fp, const char *str, const unsigned char *num, | 164 | print_bin(BIO *fp, const char *str, const unsigned char *num, |
| @@ -310,6 +315,7 @@ ECPKParameters_print(BIO *bp, const EC_GROUP *group, int off) | |||
| 310 | 315 | ||
| 311 | return ecpk_print_explicit_parameters(bp, group, off); | 316 | return ecpk_print_explicit_parameters(bp, group, off); |
| 312 | } | 317 | } |
| 318 | LCRYPTO_ALIAS(ECPKParameters_print); | ||
| 313 | 319 | ||
| 314 | static int | 320 | static int |
| 315 | print_bin(BIO *fp, const char *name, const unsigned char *buf, | 321 | print_bin(BIO *fp, const char *name, const unsigned char *buf, |
diff --git a/src/lib/libcrypto/ec/ecp_mont.c b/src/lib/libcrypto/ec/ecp_mont.c index b113855603..76d1f578ee 100644 --- a/src/lib/libcrypto/ec/ecp_mont.c +++ b/src/lib/libcrypto/ec/ecp_mont.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecp_mont.c,v 1.29 2023/04/11 18:58:20 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_mont.c,v 1.30 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -269,3 +269,4 @@ EC_GFp_mont_method(void) | |||
| 269 | { | 269 | { |
| 270 | return &ec_GFp_mont_method; | 270 | return &ec_GFp_mont_method; |
| 271 | } | 271 | } |
| 272 | LCRYPTO_ALIAS(EC_GFp_mont_method); | ||
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index d3ee9f5d92..9aa9af11f3 100644 --- a/src/lib/libcrypto/ec/ecp_smpl.c +++ b/src/lib/libcrypto/ec/ecp_smpl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecp_smpl.c,v 1.45 2023/06/30 18:19:35 tb Exp $ */ | 1 | /* $OpenBSD: ecp_smpl.c,v 1.46 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
| 3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
| 4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
| @@ -1604,3 +1604,4 @@ EC_GFp_simple_method(void) | |||
| 1604 | { | 1604 | { |
| 1605 | return &ec_GFp_simple_method; | 1605 | return &ec_GFp_simple_method; |
| 1606 | } | 1606 | } |
| 1607 | LCRYPTO_ALIAS(EC_GFp_simple_method); | ||
