summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2024-04-10 15:01:32 +0000
committerBob Beck <beck@cvs.openbsd.org>2024-04-10 15:01:32 +0000
commit6e6577a6c4507e45221ee158b5a7bfb739d191f0 (patch)
treebc274c42fdb8dbcf151879081a0f8eaa395a03f1 /lib/libcrypto
parent9e8f90bc86d535ccfde3e8cca4cbfa92ce2b68b5 (diff)
Hide deprecated functions in ec.h
use LCRYPTO_UNUSED and remove the LIBRESSL_INTERNAL guard ok tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/Symbols.namespace9
-rw-r--r--lib/libcrypto/ec/ec.h10
-rw-r--r--lib/libcrypto/ec/ec_lib.c10
-rw-r--r--lib/libcrypto/ec/ec_oct.c3
-rw-r--r--lib/libcrypto/hidden/openssl/ec.h11
5 files changed, 31 insertions, 12 deletions
diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace
index 381b797ec22..0abd5ef54da 100644
--- a/lib/libcrypto/Symbols.namespace
+++ b/lib/libcrypto/Symbols.namespace
@@ -3208,3 +3208,12 @@ _libre_EVP_EncryptFinal
_libre_EVP_DecryptFinal
_libre_EVP_CipherFinal
_libre_EVP_CIPHER_CTX_init
+_libre_EC_GROUP_clear_free
+_libre_EC_GROUP_set_curve_GFp
+_libre_EC_GROUP_get_curve_GFp
+_libre_EC_POINT_clear_free
+_libre_EC_POINT_set_Jprojective_coordinates_GFp
+_libre_EC_POINT_get_Jprojective_coordinates_GFp
+_libre_EC_POINT_set_affine_coordinates_GFp
+_libre_EC_POINT_get_affine_coordinates_GFp
+_libre_EC_POINT_set_compressed_coordinates_GFp
diff --git a/lib/libcrypto/ec/ec.h b/lib/libcrypto/ec/ec.h
index 9e3354df46e..be3f146d462 100644
--- a/lib/libcrypto/ec/ec.h
+++ b/lib/libcrypto/ec/ec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec.h,v 1.46 2023/08/11 04:45:27 tb Exp $ */
+/* $OpenBSD: ec.h,v 1.47 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -108,9 +108,7 @@ const EC_METHOD *EC_GFp_mont_method(void);
EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
void EC_GROUP_free(EC_GROUP *group);
-#ifndef LIBRESSL_INTERNAL
void EC_GROUP_clear_free(EC_GROUP *group);
-#endif
int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
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,
int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
BN_CTX *ctx);
-#if !defined(LIBRESSL_INTERNAL)
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
const BIGNUM *b, BN_CTX *ctx);
int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
BIGNUM *b, BN_CTX *ctx);
-#endif
int EC_GROUP_get_degree(const EC_GROUP *group);
@@ -176,9 +172,7 @@ int EC_curve_nist2nid(const char *name);
EC_POINT *EC_POINT_new(const EC_GROUP *group);
void EC_POINT_free(EC_POINT *point);
-#ifndef LIBRESSL_INTERNAL
void EC_POINT_clear_free(EC_POINT *point);
-#endif
int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
@@ -193,7 +187,6 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
-#ifndef LIBRESSL_INTERNAL
int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
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,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
-#endif /* !LIBRESSL_INTERNAL */
size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx);
int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c
index 00a4a703f89..dff41245800 100644
--- a/lib/libcrypto/ec/ec_lib.c
+++ b/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_lib.c,v 1.65 2023/07/25 06:57:26 tb Exp $ */
+/* $OpenBSD: ec_lib.c,v 1.66 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -136,6 +136,7 @@ EC_GROUP_clear_free(EC_GROUP *group)
{
EC_GROUP_free(group);
}
+LCRYPTO_ALIAS(EC_GROUP_clear_free);
int
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,
{
return EC_GROUP_set_curve(group, p, a, b, ctx);
}
+LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp);
int
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,
{
return EC_GROUP_get_curve(group, p, a, b, ctx);
}
+LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp);
int
EC_GROUP_get_degree(const EC_GROUP *group)
@@ -727,6 +730,7 @@ EC_POINT_clear_free(EC_POINT *point)
{
EC_POINT_free(point);
}
+LCRYPTO_ALIAS(EC_POINT_clear_free);
int
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,
{
return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx);
}
+LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp);
int
EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
@@ -869,6 +874,7 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
{
return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx);
}
+LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp);
int
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,
{
return EC_POINT_set_affine_coordinates(group, point, x, y, ctx);
}
+LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp);
int
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
{
return EC_POINT_get_affine_coordinates(group, point, x, y, ctx);
}
+LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp);
int
EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
diff --git a/lib/libcrypto/ec/ec_oct.c b/lib/libcrypto/ec/ec_oct.c
index 9308d409c25..82498665025 100644
--- a/lib/libcrypto/ec/ec_oct.c
+++ b/lib/libcrypto/ec/ec_oct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_oct.c,v 1.16 2023/07/07 19:37:53 beck Exp $ */
+/* $OpenBSD: ec_oct.c,v 1.17 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@@ -107,6 +107,7 @@ EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
{
return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
}
+LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates_GFp);
size_t
EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point,
diff --git a/lib/libcrypto/hidden/openssl/ec.h b/lib/libcrypto/hidden/openssl/ec.h
index 4e82f4846ce..cb69755518f 100644
--- a/lib/libcrypto/hidden/openssl/ec.h
+++ b/lib/libcrypto/hidden/openssl/ec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec.h,v 1.4 2023/07/28 09:25:12 tb Exp $ */
+/* $OpenBSD: ec.h,v 1.5 2024/04/10 15:01:31 beck Exp $ */
/*
* Copyright (c) 2023 Bob Beck <beck@openbsd.org>
*
@@ -161,5 +161,14 @@ LCRYPTO_USED(EC_KEY_METHOD_get_sign);
LCRYPTO_USED(EC_KEY_METHOD_get_verify);
LCRYPTO_USED(ECParameters_dup);
LCRYPTO_USED(ERR_load_EC_strings);
+LCRYPTO_UNUSED(EC_GROUP_clear_free);
+LCRYPTO_UNUSED(EC_GROUP_set_curve_GFp);
+LCRYPTO_UNUSED(EC_GROUP_get_curve_GFp);
+LCRYPTO_UNUSED(EC_POINT_clear_free);
+LCRYPTO_UNUSED(EC_POINT_set_Jprojective_coordinates_GFp);
+LCRYPTO_UNUSED(EC_POINT_get_Jprojective_coordinates_GFp);
+LCRYPTO_UNUSED(EC_POINT_set_affine_coordinates_GFp);
+LCRYPTO_UNUSED(EC_POINT_get_affine_coordinates_GFp);
+LCRYPTO_UNUSED(EC_POINT_set_compressed_coordinates_GFp);
#endif /* _LIBCRYPTO_EC_H */