diff options
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ec_oct.c | 3 |
3 files changed, 3 insertions, 26 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 0435f0a75f..683ca17417 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.47 2023/07/07 13:54:45 beck Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.48 2023/07/07 19:37:53 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -185,14 +185,12 @@ X9_62_PENTANOMIAL_new(void) | |||
185 | { | 185 | { |
186 | return (X9_62_PENTANOMIAL*)ASN1_item_new(&X9_62_PENTANOMIAL_it); | 186 | return (X9_62_PENTANOMIAL*)ASN1_item_new(&X9_62_PENTANOMIAL_it); |
187 | } | 187 | } |
188 | LCRYPTO_ALIAS(X9_62_PENTANOMIAL_new); | ||
189 | 188 | ||
190 | void | 189 | void |
191 | X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a) | 190 | X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a) |
192 | { | 191 | { |
193 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_PENTANOMIAL_it); | 192 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_PENTANOMIAL_it); |
194 | } | 193 | } |
195 | LCRYPTO_ALIAS(X9_62_PENTANOMIAL_free); | ||
196 | 194 | ||
197 | static const ASN1_TEMPLATE char_two_def_tt = { | 195 | static const ASN1_TEMPLATE char_two_def_tt = { |
198 | .flags = 0, | 196 | .flags = 0, |
@@ -287,14 +285,12 @@ X9_62_CHARACTERISTIC_TWO_new(void) | |||
287 | { | 285 | { |
288 | return (X9_62_CHARACTERISTIC_TWO*)ASN1_item_new(&X9_62_CHARACTERISTIC_TWO_it); | 286 | return (X9_62_CHARACTERISTIC_TWO*)ASN1_item_new(&X9_62_CHARACTERISTIC_TWO_it); |
289 | } | 287 | } |
290 | LCRYPTO_ALIAS(X9_62_CHARACTERISTIC_TWO_new); | ||
291 | 288 | ||
292 | void | 289 | void |
293 | X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a) | 290 | X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a) |
294 | { | 291 | { |
295 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_CHARACTERISTIC_TWO_it); | 292 | ASN1_item_free((ASN1_VALUE *)a, &X9_62_CHARACTERISTIC_TWO_it); |
296 | } | 293 | } |
297 | LCRYPTO_ALIAS(X9_62_CHARACTERISTIC_TWO_free); | ||
298 | 294 | ||
299 | static const ASN1_TEMPLATE fieldID_def_tt = { | 295 | static const ASN1_TEMPLATE fieldID_def_tt = { |
300 | .flags = 0, | 296 | .flags = 0, |
@@ -460,14 +456,12 @@ ECPARAMETERS_new(void) | |||
460 | { | 456 | { |
461 | return (ECPARAMETERS*)ASN1_item_new(&ECPARAMETERS_it); | 457 | return (ECPARAMETERS*)ASN1_item_new(&ECPARAMETERS_it); |
462 | } | 458 | } |
463 | LCRYPTO_ALIAS(ECPARAMETERS_new); | ||
464 | 459 | ||
465 | void | 460 | void |
466 | ECPARAMETERS_free(ECPARAMETERS *a) | 461 | ECPARAMETERS_free(ECPARAMETERS *a) |
467 | { | 462 | { |
468 | ASN1_item_free((ASN1_VALUE *)a, &ECPARAMETERS_it); | 463 | ASN1_item_free((ASN1_VALUE *)a, &ECPARAMETERS_it); |
469 | } | 464 | } |
470 | LCRYPTO_ALIAS(ECPARAMETERS_free); | ||
471 | 465 | ||
472 | static const ASN1_TEMPLATE ECPKPARAMETERS_ch_tt[] = { | 466 | static const ASN1_TEMPLATE ECPKPARAMETERS_ch_tt[] = { |
473 | { | 467 | { |
@@ -514,28 +508,24 @@ d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len) | |||
514 | return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 508 | return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
515 | &ECPKPARAMETERS_it); | 509 | &ECPKPARAMETERS_it); |
516 | } | 510 | } |
517 | LCRYPTO_ALIAS(d2i_ECPKPARAMETERS); | ||
518 | 511 | ||
519 | int | 512 | int |
520 | i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out) | 513 | i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out) |
521 | { | 514 | { |
522 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECPKPARAMETERS_it); | 515 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECPKPARAMETERS_it); |
523 | } | 516 | } |
524 | LCRYPTO_ALIAS(i2d_ECPKPARAMETERS); | ||
525 | 517 | ||
526 | ECPKPARAMETERS * | 518 | ECPKPARAMETERS * |
527 | ECPKPARAMETERS_new(void) | 519 | ECPKPARAMETERS_new(void) |
528 | { | 520 | { |
529 | return (ECPKPARAMETERS *)ASN1_item_new(&ECPKPARAMETERS_it); | 521 | return (ECPKPARAMETERS *)ASN1_item_new(&ECPKPARAMETERS_it); |
530 | } | 522 | } |
531 | LCRYPTO_ALIAS(ECPKPARAMETERS_new); | ||
532 | 523 | ||
533 | void | 524 | void |
534 | ECPKPARAMETERS_free(ECPKPARAMETERS *a) | 525 | ECPKPARAMETERS_free(ECPKPARAMETERS *a) |
535 | { | 526 | { |
536 | ASN1_item_free((ASN1_VALUE *)a, &ECPKPARAMETERS_it); | 527 | ASN1_item_free((ASN1_VALUE *)a, &ECPKPARAMETERS_it); |
537 | } | 528 | } |
538 | LCRYPTO_ALIAS(ECPKPARAMETERS_free); | ||
539 | 529 | ||
540 | static const ASN1_TEMPLATE EC_PRIVATEKEY_seq_tt[] = { | 530 | static const ASN1_TEMPLATE EC_PRIVATEKEY_seq_tt[] = { |
541 | { | 531 | { |
@@ -589,28 +579,24 @@ d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len) | |||
589 | return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 579 | return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
590 | &EC_PRIVATEKEY_it); | 580 | &EC_PRIVATEKEY_it); |
591 | } | 581 | } |
592 | LCRYPTO_ALIAS(d2i_EC_PRIVATEKEY); | ||
593 | 582 | ||
594 | int | 583 | int |
595 | i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out) | 584 | i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out) |
596 | { | 585 | { |
597 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &EC_PRIVATEKEY_it); | 586 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &EC_PRIVATEKEY_it); |
598 | } | 587 | } |
599 | LCRYPTO_ALIAS(i2d_EC_PRIVATEKEY); | ||
600 | 588 | ||
601 | EC_PRIVATEKEY * | 589 | EC_PRIVATEKEY * |
602 | EC_PRIVATEKEY_new(void) | 590 | EC_PRIVATEKEY_new(void) |
603 | { | 591 | { |
604 | return (EC_PRIVATEKEY *)ASN1_item_new(&EC_PRIVATEKEY_it); | 592 | return (EC_PRIVATEKEY *)ASN1_item_new(&EC_PRIVATEKEY_it); |
605 | } | 593 | } |
606 | LCRYPTO_ALIAS(EC_PRIVATEKEY_new); | ||
607 | 594 | ||
608 | void | 595 | void |
609 | EC_PRIVATEKEY_free(EC_PRIVATEKEY *a) | 596 | EC_PRIVATEKEY_free(EC_PRIVATEKEY *a) |
610 | { | 597 | { |
611 | ASN1_item_free((ASN1_VALUE *)a, &EC_PRIVATEKEY_it); | 598 | ASN1_item_free((ASN1_VALUE *)a, &EC_PRIVATEKEY_it); |
612 | } | 599 | } |
613 | LCRYPTO_ALIAS(EC_PRIVATEKEY_free); | ||
614 | 600 | ||
615 | /* some declarations of internal function */ | 601 | /* some declarations of internal function */ |
616 | 602 | ||
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 3db1ca2f07..b5788492cc 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.63 2023/07/07 13:54:45 beck Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.64 2023/07/07 19:37:53 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 | */ |
@@ -136,7 +136,6 @@ EC_GROUP_clear_free(EC_GROUP *group) | |||
136 | { | 136 | { |
137 | EC_GROUP_free(group); | 137 | EC_GROUP_free(group); |
138 | } | 138 | } |
139 | LCRYPTO_ALIAS(EC_GROUP_clear_free); | ||
140 | 139 | ||
141 | int | 140 | int |
142 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) | 141 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) |
@@ -543,7 +542,6 @@ EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
543 | { | 542 | { |
544 | return EC_GROUP_set_curve(group, p, a, b, ctx); | 543 | return EC_GROUP_set_curve(group, p, a, b, ctx); |
545 | } | 544 | } |
546 | LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp); | ||
547 | 545 | ||
548 | int | 546 | int |
549 | EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | 547 | EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, |
@@ -551,7 +549,6 @@ EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | |||
551 | { | 549 | { |
552 | return EC_GROUP_get_curve(group, p, a, b, ctx); | 550 | return EC_GROUP_get_curve(group, p, a, b, ctx); |
553 | } | 551 | } |
554 | LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp); | ||
555 | 552 | ||
556 | int | 553 | int |
557 | EC_GROUP_get_degree(const EC_GROUP *group) | 554 | EC_GROUP_get_degree(const EC_GROUP *group) |
@@ -730,7 +727,6 @@ EC_POINT_clear_free(EC_POINT *point) | |||
730 | { | 727 | { |
731 | EC_POINT_free(point); | 728 | EC_POINT_free(point); |
732 | } | 729 | } |
733 | LCRYPTO_ALIAS(EC_POINT_clear_free); | ||
734 | 730 | ||
735 | int | 731 | int |
736 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) | 732 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) |
@@ -866,7 +862,6 @@ EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
866 | { | 862 | { |
867 | return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx); | 863 | return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx); |
868 | } | 864 | } |
869 | LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp); | ||
870 | 865 | ||
871 | int | 866 | int |
872 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | 867 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, |
@@ -874,7 +869,6 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | |||
874 | { | 869 | { |
875 | return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx); | 870 | return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx); |
876 | } | 871 | } |
877 | LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp); | ||
878 | 872 | ||
879 | int | 873 | int |
880 | EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, | 874 | EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, |
@@ -920,7 +914,6 @@ EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
920 | { | 914 | { |
921 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); | 915 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); |
922 | } | 916 | } |
923 | LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp); | ||
924 | 917 | ||
925 | int | 918 | int |
926 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, | 919 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, |
@@ -958,7 +951,6 @@ EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point | |||
958 | { | 951 | { |
959 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); | 952 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); |
960 | } | 953 | } |
961 | LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp); | ||
962 | 954 | ||
963 | int | 955 | int |
964 | EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | 956 | EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, |
diff --git a/src/lib/libcrypto/ec/ec_oct.c b/src/lib/libcrypto/ec/ec_oct.c index b9bc62a4e3..9308d409c2 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.15 2023/07/07 13:54:45 beck Exp $ */ | 1 | /* $OpenBSD: ec_oct.c,v 1.16 2023/07/07 19:37:53 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 | */ |
@@ -107,7 +107,6 @@ EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
107 | { | 107 | { |
108 | 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); |
109 | } | 109 | } |
110 | LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates_GFp); | ||
111 | 110 | ||
112 | size_t | 111 | size_t |
113 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, | 112 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, |