summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2024-04-10 15:01:31 +0000
committerbeck <>2024-04-10 15:01:31 +0000
commite9f031c5bf19d665a70b4ada8d7323aa1cbee38b (patch)
treec4a9c941b532dd91b9fcc12a9ec54f7275cedf08 /src
parent8b041422435150e802f8d2bda683ae248b607c20 (diff)
downloadopenbsd-e9f031c5bf19d665a70b4ada8d7323aa1cbee38b.tar.gz
openbsd-e9f031c5bf19d665a70b4ada8d7323aa1cbee38b.tar.bz2
openbsd-e9f031c5bf19d665a70b4ada8d7323aa1cbee38b.zip
Hide deprecated functions in ec.h
use LCRYPTO_UNUSED and remove the LIBRESSL_INTERNAL guard ok tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/Symbols.namespace9
-rw-r--r--src/lib/libcrypto/ec/ec.h10
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c10
-rw-r--r--src/lib/libcrypto/ec/ec_oct.c3
-rw-r--r--src/lib/libcrypto/hidden/openssl/ec.h11
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
109EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); 109EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
110void EC_GROUP_free(EC_GROUP *group); 110void EC_GROUP_free(EC_GROUP *group);
111#ifndef LIBRESSL_INTERNAL
112void EC_GROUP_clear_free(EC_GROUP *group); 111void EC_GROUP_clear_free(EC_GROUP *group);
113#endif
114 112
115int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); 113int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
116EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); 114EC_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,
145int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, 143int 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)
149int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, 146int 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);
151int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, 148int 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
155int EC_GROUP_get_degree(const EC_GROUP *group); 151int EC_GROUP_get_degree(const EC_GROUP *group);
156 152
@@ -176,9 +172,7 @@ int EC_curve_nist2nid(const char *name);
176 172
177EC_POINT *EC_POINT_new(const EC_GROUP *group); 173EC_POINT *EC_POINT_new(const EC_GROUP *group);
178void EC_POINT_free(EC_POINT *point); 174void EC_POINT_free(EC_POINT *point);
179#ifndef LIBRESSL_INTERNAL
180void EC_POINT_clear_free(EC_POINT *point); 175void EC_POINT_clear_free(EC_POINT *point);
181#endif
182int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); 176int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
183EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); 177EC_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,
193int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p, 187int 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
197int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, 190int 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);
199int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, 192int 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);
205int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, 198int 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 */
208size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, 200size_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);
210int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, 202int 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}
139LCRYPTO_ALIAS(EC_GROUP_clear_free);
139 140
140int 141int
141EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) 142EC_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}
546LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp);
545 547
546int 548int
547EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, 549EC_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}
554LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp);
552 555
553int 556int
554EC_GROUP_get_degree(const EC_GROUP *group) 557EC_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}
733LCRYPTO_ALIAS(EC_POINT_clear_free);
730 734
731int 735int
732EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) 736EC_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}
869LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp);
865 870
866int 871int
867EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, 872EC_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}
877LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp);
872 878
873int 879int
874EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, 880EC_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}
923LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp);
917 924
918int 925int
919EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, 926EC_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}
961LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp);
954 962
955int 963int
956EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, 964EC_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}
110LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates_GFp);
110 111
111size_t 112size_t
112EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, 113EC_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);
161LCRYPTO_USED(EC_KEY_METHOD_get_verify); 161LCRYPTO_USED(EC_KEY_METHOD_get_verify);
162LCRYPTO_USED(ECParameters_dup); 162LCRYPTO_USED(ECParameters_dup);
163LCRYPTO_USED(ERR_load_EC_strings); 163LCRYPTO_USED(ERR_load_EC_strings);
164LCRYPTO_UNUSED(EC_GROUP_clear_free);
165LCRYPTO_UNUSED(EC_GROUP_set_curve_GFp);
166LCRYPTO_UNUSED(EC_GROUP_get_curve_GFp);
167LCRYPTO_UNUSED(EC_POINT_clear_free);
168LCRYPTO_UNUSED(EC_POINT_set_Jprojective_coordinates_GFp);
169LCRYPTO_UNUSED(EC_POINT_get_Jprojective_coordinates_GFp);
170LCRYPTO_UNUSED(EC_POINT_set_affine_coordinates_GFp);
171LCRYPTO_UNUSED(EC_POINT_get_affine_coordinates_GFp);
172LCRYPTO_UNUSED(EC_POINT_set_compressed_coordinates_GFp);
164 173
165#endif /* _LIBCRYPTO_EC_H */ 174#endif /* _LIBCRYPTO_EC_H */