]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
undeprecate EVP_PKEY_cmp and EVP_PKEY_cmp_parameters
authorTim Hudson <tjh@cryptsoft.com>
Tue, 2 Jun 2020 01:16:14 +0000 (11:16 +1000)
committerRichard Levitte <levitte@openssl.org>
Wed, 16 Sep 2020 19:38:45 +0000 (21:38 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12013)

crypto/evp/p_lib.c
doc/man3/EVP_PKEY_copy_parameters.pod
include/openssl/evp.h
util/libcrypto.num

index 8fe702787d11b64d61b0d1f2989c1882092842ce..e336d91286c0ef84193698b5035a7ab070b4331b 100644 (file)
@@ -275,12 +275,10 @@ static int evp_pkey_cmp_any(const EVP_PKEY *a, const EVP_PKEY *b,
     return evp_keymgmt_match(keymgmt1, keydata1, keydata2, selection);
 }
 
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
 {
     return EVP_PKEY_parameters_eq(a, b);
 }
-#endif
 
 int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b)
 {
@@ -300,12 +298,10 @@ int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b)
     return -2;
 }
 
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
 {
     return EVP_PKEY_eq(a, b);
 }
-#endif
 
 int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b)
 {
index a3879c4e01368957c1400e231064faa330d706d0..742418cf104f91b0e408a2dcd22511811ee1c556 100644 (file)
@@ -46,6 +46,11 @@ Since OpenSSL private keys contain public key components too the function
 EVP_PKEY_eq() can also be used to determine if a private key matches
 a public key.
 
+EVP_PKEY_cmp() and EVP_PKEY_cmp_parameters() differ in their return values 
+compared to other _cmp() functions. They are aliases for EVP_PKEY_eq() and 
+EVP_PKEY_parameters_eq() functions provided for backwards compatibility 
+with existing applications.
+
 =head1 RETURN VALUES
 
 The function EVP_PKEY_missing_parameters() returns 1 if the public key
@@ -55,7 +60,8 @@ doesn't use parameters.
 These functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for
 failure.
 
-The function EVP_PKEY_parameters_eq() and EVP_PKEY_eq() return 1 if their
+The functions EVP_PKEY_cmp_parameters(), EVP_PKEY_parameters_eq(), 
+EVP_PKEY_cmp() and EVP_PKEY_eq() return 1 if their
 inputs match, 0 if they don't match, -1 if the key types are different and
 -2 if the operation is not supported.
 
@@ -66,11 +72,10 @@ L<EVP_PKEY_keygen(3)>
 
 =head1 HISTORY
 
-The function EVP_PKEY_cmp was deprecated and renamed to B<EVP_PKEY_eq> and
-EVP_PKEY_cmp_parameters was deprecated and renamed to B<EVP_PKEY_parameters_eq>
-(without changing semantics) in OpenSSL 3.0.
-This was done to avoid confusion on their return values with other _cmp()
-functions that return 0 in case their arguments are equal.
+EVP_PKEY_eq() and EVP_PKEY_parameters_eq() were added in OpenSSL 3.0 to 
+avoid confusion on the return values of EVP_PKEY_cmp() and 
+EVP_PKEY_cmp_parameters() which unlike other _cmp()
+functions do not return 0 in case their arguments are equal.
 
 =head1 COPYRIGHT
 
index 74f97fd3e2ad1c2ec0188fae05b752d553c1c0e2..4d0cc9d560216585a2478ab0a4a93612393c4d13 100644 (file)
@@ -1281,14 +1281,10 @@ EVP_PKEY *d2i_KeyParams_bio(int type, EVP_PKEY **a, BIO *in);
 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
-#endif
 int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b);
 
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
-#endif
 int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b);
 
 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
index 42bbb4bd04ee3261dffe16f69de4c54076b3ff9a..6070b570a58a0fa91d24431fa7005cbf2b975acc 100644 (file)
@@ -190,7 +190,7 @@ EVP_DigestInit                          193 3_0_0   EXIST::FUNCTION:
 EVP_PKEY_meth_find                      194    3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0
 X509_VERIFY_PARAM_get_count             195    3_0_0   EXIST::FUNCTION:
 ASN1_BIT_STRING_get_bit                 196    3_0_0   EXIST::FUNCTION:
-EVP_PKEY_cmp                            197    3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0
+EVP_PKEY_cmp                            197    3_0_0   EXIST::FUNCTION:
 d2i_X509_ALGORS                         198    3_0_0   EXIST::FUNCTION:
 EVP_PKEY2PKCS8                          199    3_0_0   EXIST::FUNCTION:
 BN_nist_mod_256                         200    3_0_0   EXIST::FUNCTION:
@@ -3461,7 +3461,7 @@ ERR_print_errors_cb                     3531      3_0_0   EXIST::FUNCTION:
 ENGINE_set_default_string               3532   3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
 BIO_number_read                         3533   3_0_0   EXIST::FUNCTION:
 CRYPTO_zalloc                           3534   3_0_0   EXIST::FUNCTION:
-EVP_PKEY_cmp_parameters                 3535   3_0_0   EXIST::FUNCTION:DEPRECATEDIN_3_0
+EVP_PKEY_cmp_parameters                 3535   3_0_0   EXIST::FUNCTION:
 EVP_PKEY_CTX_new_id                     3537   3_0_0   EXIST::FUNCTION:
 TLS_FEATURE_free                        3538   3_0_0   EXIST::FUNCTION:
 d2i_BASIC_CONSTRAINTS                   3539   3_0_0   EXIST::FUNCTION: