From: Pauli Date: Tue, 28 Jan 2020 02:38:47 +0000 (+1000) Subject: Deprecate the ECDH functions. X-Git-Tag: openssl-3.0.0-alpha1~560 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e3f9aa4e9a915f25b36bb085515d4786a253385;p=oweals%2Fopenssl.git Deprecate the ECDH functions. Use of the low level ECDH functions has been informally discouraged for a long time. We now formally deprecate them. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10960) --- diff --git a/crypto/ec/ec_kmeth.c b/crypto/ec/ec_kmeth.c index 9556a94210..7aa9865d29 100644 --- a/crypto/ec/ec_kmeth.c +++ b/crypto/ec/ec_kmeth.c @@ -7,6 +7,12 @@ * https://www.openssl.org/source/license.html */ +/* + * ECDH and ECDSA low level APIs are deprecated for public use, but still ok + * for internal use. + */ +#include "internal/deprecated.h" + #include #include #include diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index 1750e43d16..d4a59b57ee 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -7,6 +7,12 @@ * https://www.openssl.org/source/license.html */ +/* + * ECDH and ECDSA low level APIs are deprecated for public use, but still ok + * for internal use. + */ +#include "internal/deprecated.h" + #include #include "internal/cryptlib.h" #include diff --git a/crypto/ec/ecdh_kdf.c b/crypto/ec/ecdh_kdf.c index 000b12a515..bc9c968655 100644 --- a/crypto/ec/ecdh_kdf.c +++ b/crypto/ec/ecdh_kdf.c @@ -7,6 +7,12 @@ * https://www.openssl.org/source/license.html */ +/* + * ECDH low level APIs are deprecated for public use, but still ok for + * internal use. + */ +#include "internal/deprecated.h" + #include #include #include diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 3787d2f807..81e7bd28b8 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -1180,10 +1180,11 @@ DEPRECATEDIN_3_0(int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, const unsigned char *sinfo, size_t sinfolen, const EVP_MD *md)) -int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, - const EC_KEY *ecdh, - void *(*KDF) (const void *in, size_t inlen, - void *out, size_t *outlen)); +DEPRECATEDIN_3_0(int ECDH_compute_key(void *out, size_t outlen, + const EC_POINT *pub_key, + const EC_KEY *ecdh, + void *(*KDF)(const void *in, size_t inlen, + void *out, size_t *outlen))) typedef struct ECDSA_SIG_st ECDSA_SIG;