diff options
| author | beck <> | 2024-04-10 15:01:31 +0000 |
|---|---|---|
| committer | beck <> | 2024-04-10 15:01:31 +0000 |
| commit | 44e6571837baace01f7843216f9eb46b9fd3b00e (patch) | |
| tree | c4a9c941b532dd91b9fcc12a9ec54f7275cedf08 /src/lib/libc | |
| parent | 20ec75270d82cdbe18bc78b00516a72ae16b122e (diff) | |
| download | openbsd-44e6571837baace01f7843216f9eb46b9fd3b00e.tar.gz openbsd-44e6571837baace01f7843216f9eb46b9fd3b00e.tar.bz2 openbsd-44e6571837baace01f7843216f9eb46b9fd3b00e.zip | |
Hide deprecated functions in ec.h
use LCRYPTO_UNUSED and remove the LIBRESSL_INTERNAL guard
ok tb@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec.h | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_oct.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/hidden/openssl/ec.h | 11 |
5 files changed, 31 insertions, 12 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index 381b797ec2..0abd5ef54d 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
| @@ -3208,3 +3208,12 @@ _libre_EVP_EncryptFinal | |||
| 3208 | _libre_EVP_DecryptFinal | 3208 | _libre_EVP_DecryptFinal |
| 3209 | _libre_EVP_CipherFinal | 3209 | _libre_EVP_CipherFinal |
| 3210 | _libre_EVP_CIPHER_CTX_init | 3210 | _libre_EVP_CIPHER_CTX_init |
| 3211 | _libre_EC_GROUP_clear_free | ||
| 3212 | _libre_EC_GROUP_set_curve_GFp | ||
| 3213 | _libre_EC_GROUP_get_curve_GFp | ||
| 3214 | _libre_EC_POINT_clear_free | ||
| 3215 | _libre_EC_POINT_set_Jprojective_coordinates_GFp | ||
| 3216 | _libre_EC_POINT_get_Jprojective_coordinates_GFp | ||
| 3217 | _libre_EC_POINT_set_affine_coordinates_GFp | ||
| 3218 | _libre_EC_POINT_get_affine_coordinates_GFp | ||
| 3219 | _libre_EC_POINT_set_compressed_coordinates_GFp | ||
diff --git a/src/lib/libcrypto/ec/ec.h b/src/lib/libcrypto/ec/ec.h index 9e3354df46..be3f146d46 100644 --- a/src/lib/libcrypto/ec/ec.h +++ b/src/lib/libcrypto/ec/ec.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec.h,v 1.46 2023/08/11 04:45:27 tb Exp $ */ | 1 | /* $OpenBSD: ec.h,v 1.47 2024/04/10 15:01:31 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 | */ |
| @@ -108,9 +108,7 @@ const EC_METHOD *EC_GFp_mont_method(void); | |||
| 108 | 108 | ||
| 109 | EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); | 109 | EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); |
| 110 | void EC_GROUP_free(EC_GROUP *group); | 110 | void EC_GROUP_free(EC_GROUP *group); |
| 111 | #ifndef LIBRESSL_INTERNAL | ||
| 112 | void EC_GROUP_clear_free(EC_GROUP *group); | 111 | void EC_GROUP_clear_free(EC_GROUP *group); |
| 113 | #endif | ||
| 114 | 112 | ||
| 115 | int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); | 113 | int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); |
| 116 | EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); | 114 | EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); |
| @@ -145,12 +143,10 @@ int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 145 | int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | 143 | int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, |
| 146 | BN_CTX *ctx); | 144 | BN_CTX *ctx); |
| 147 | 145 | ||
| 148 | #if !defined(LIBRESSL_INTERNAL) | ||
| 149 | int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | 146 | int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, |
| 150 | const BIGNUM *b, BN_CTX *ctx); | 147 | const BIGNUM *b, BN_CTX *ctx); |
| 151 | int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, | 148 | int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, |
| 152 | BIGNUM *b, BN_CTX *ctx); | 149 | BIGNUM *b, BN_CTX *ctx); |
| 153 | #endif | ||
| 154 | 150 | ||
| 155 | int EC_GROUP_get_degree(const EC_GROUP *group); | 151 | int EC_GROUP_get_degree(const EC_GROUP *group); |
| 156 | 152 | ||
| @@ -176,9 +172,7 @@ int EC_curve_nist2nid(const char *name); | |||
| 176 | 172 | ||
| 177 | EC_POINT *EC_POINT_new(const EC_GROUP *group); | 173 | EC_POINT *EC_POINT_new(const EC_GROUP *group); |
| 178 | void EC_POINT_free(EC_POINT *point); | 174 | void EC_POINT_free(EC_POINT *point); |
| 179 | #ifndef LIBRESSL_INTERNAL | ||
| 180 | void EC_POINT_clear_free(EC_POINT *point); | 175 | void EC_POINT_clear_free(EC_POINT *point); |
| 181 | #endif | ||
| 182 | int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); | 176 | int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); |
| 183 | EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); | 177 | EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); |
| 184 | 178 | ||
| @@ -193,7 +187,6 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p, | |||
| 193 | int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p, | 187 | int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p, |
| 194 | const BIGNUM *x, int y_bit, BN_CTX *ctx); | 188 | const BIGNUM *x, int y_bit, BN_CTX *ctx); |
| 195 | 189 | ||
| 196 | #ifndef LIBRESSL_INTERNAL | ||
| 197 | int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, | 190 | int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, |
| 198 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx); | 191 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx); |
| 199 | int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | 192 | int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, |
| @@ -204,7 +197,6 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, | |||
| 204 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); | 197 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); |
| 205 | int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, | 198 | int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, |
| 206 | const BIGNUM *x, int y_bit, BN_CTX *ctx); | 199 | const BIGNUM *x, int y_bit, BN_CTX *ctx); |
| 207 | #endif /* !LIBRESSL_INTERNAL */ | ||
| 208 | size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, | 200 | size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, |
| 209 | point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx); | 201 | point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx); |
| 210 | int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, | 202 | int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, |
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 00a4a703f8..dff4124580 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.65 2023/07/25 06:57:26 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.66 2024/04/10 15:01:31 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,6 +136,7 @@ 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); | ||
| 139 | 140 | ||
| 140 | int | 141 | int |
| 141 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) | 142 | EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) |
| @@ -542,6 +543,7 @@ EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 542 | { | 543 | { |
| 543 | return EC_GROUP_set_curve(group, p, a, b, ctx); | 544 | return EC_GROUP_set_curve(group, p, a, b, ctx); |
| 544 | } | 545 | } |
| 546 | LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp); | ||
| 545 | 547 | ||
| 546 | int | 548 | int |
| 547 | 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, |
| @@ -549,6 +551,7 @@ EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, | |||
| 549 | { | 551 | { |
| 550 | return EC_GROUP_get_curve(group, p, a, b, ctx); | 552 | return EC_GROUP_get_curve(group, p, a, b, ctx); |
| 551 | } | 553 | } |
| 554 | LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp); | ||
| 552 | 555 | ||
| 553 | int | 556 | int |
| 554 | EC_GROUP_get_degree(const EC_GROUP *group) | 557 | EC_GROUP_get_degree(const EC_GROUP *group) |
| @@ -727,6 +730,7 @@ EC_POINT_clear_free(EC_POINT *point) | |||
| 727 | { | 730 | { |
| 728 | EC_POINT_free(point); | 731 | EC_POINT_free(point); |
| 729 | } | 732 | } |
| 733 | LCRYPTO_ALIAS(EC_POINT_clear_free); | ||
| 730 | 734 | ||
| 731 | int | 735 | int |
| 732 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) | 736 | EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) |
| @@ -862,6 +866,7 @@ EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
| 862 | { | 866 | { |
| 863 | 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); |
| 864 | } | 868 | } |
| 869 | LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp); | ||
| 865 | 870 | ||
| 866 | int | 871 | int |
| 867 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | 872 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, |
| @@ -869,6 +874,7 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | |||
| 869 | { | 874 | { |
| 870 | 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); |
| 871 | } | 876 | } |
| 877 | LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp); | ||
| 872 | 878 | ||
| 873 | int | 879 | int |
| 874 | 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, |
| @@ -914,6 +920,7 @@ EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | |||
| 914 | { | 920 | { |
| 915 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); | 921 | return EC_POINT_set_affine_coordinates(group, point, x, y, ctx); |
| 916 | } | 922 | } |
| 923 | LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp); | ||
| 917 | 924 | ||
| 918 | int | 925 | int |
| 919 | 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, |
| @@ -951,6 +958,7 @@ EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point | |||
| 951 | { | 958 | { |
| 952 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); | 959 | return EC_POINT_get_affine_coordinates(group, point, x, y, ctx); |
| 953 | } | 960 | } |
| 961 | LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp); | ||
| 954 | 962 | ||
| 955 | int | 963 | int |
| 956 | 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, |
diff --git a/src/lib/libcrypto/ec/ec_oct.c b/src/lib/libcrypto/ec/ec_oct.c index 9308d409c2..8249866502 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.16 2023/07/07 19:37:53 beck Exp $ */ | 1 | /* $OpenBSD: ec_oct.c,v 1.17 2024/04/10 15:01:31 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,6 +107,7 @@ 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); | ||
| 110 | 111 | ||
| 111 | size_t | 112 | size_t |
| 112 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, | 113 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, |
diff --git a/src/lib/libcrypto/hidden/openssl/ec.h b/src/lib/libcrypto/hidden/openssl/ec.h index 4e82f4846c..cb69755518 100644 --- a/src/lib/libcrypto/hidden/openssl/ec.h +++ b/src/lib/libcrypto/hidden/openssl/ec.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec.h,v 1.4 2023/07/28 09:25:12 tb Exp $ */ | 1 | /* $OpenBSD: ec.h,v 1.5 2024/04/10 15:01:31 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -161,5 +161,14 @@ LCRYPTO_USED(EC_KEY_METHOD_get_sign); | |||
| 161 | LCRYPTO_USED(EC_KEY_METHOD_get_verify); | 161 | LCRYPTO_USED(EC_KEY_METHOD_get_verify); |
| 162 | LCRYPTO_USED(ECParameters_dup); | 162 | LCRYPTO_USED(ECParameters_dup); |
| 163 | LCRYPTO_USED(ERR_load_EC_strings); | 163 | LCRYPTO_USED(ERR_load_EC_strings); |
| 164 | LCRYPTO_UNUSED(EC_GROUP_clear_free); | ||
| 165 | LCRYPTO_UNUSED(EC_GROUP_set_curve_GFp); | ||
| 166 | LCRYPTO_UNUSED(EC_GROUP_get_curve_GFp); | ||
| 167 | LCRYPTO_UNUSED(EC_POINT_clear_free); | ||
| 168 | LCRYPTO_UNUSED(EC_POINT_set_Jprojective_coordinates_GFp); | ||
| 169 | LCRYPTO_UNUSED(EC_POINT_get_Jprojective_coordinates_GFp); | ||
| 170 | LCRYPTO_UNUSED(EC_POINT_set_affine_coordinates_GFp); | ||
| 171 | LCRYPTO_UNUSED(EC_POINT_get_affine_coordinates_GFp); | ||
| 172 | LCRYPTO_UNUSED(EC_POINT_set_compressed_coordinates_GFp); | ||
| 164 | 173 | ||
| 165 | #endif /* _LIBCRYPTO_EC_H */ | 174 | #endif /* _LIBCRYPTO_EC_H */ |
