Update source files for deprecation at 3.0 Previous macros suggested that from 3.0, we're only allowed to deprecate things at a major version. However, there's no policy stating this, but there is for removal, saying that to remove something, it must have been deprecated for 5 years, and that removal can only happen at a major version. Meanwhile, the semantic versioning rule is that deprecation should trigger a MINOR version update, which is reflected in the macro names as of this change. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10364)
diff --git a/test/asn1_decode_test.c b/test/asn1_decode_test.c index 81c0f93..b0c031a 100644 --- a/test/asn1_decode_test.c +++ b/test/asn1_decode_test.c
@@ -28,7 +28,7 @@ 0x02, 0x00 /* INTEGER tag + length */ }; -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 /* LONG case ************************************************************* */ typedef struct { @@ -162,7 +162,7 @@ int setup_tests(void) { -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 ADD_TEST(test_long); #endif ADD_TEST(test_int32);
diff --git a/test/asn1_encode_test.c b/test/asn1_encode_test.c index 64f8f17..4ff8a20 100644 --- a/test/asn1_encode_test.c +++ b/test/asn1_encode_test.c
@@ -179,7 +179,7 @@ ENCDEC_DATA(-1, -1), \ ENCDEC_DATA(0, ASN1_LONG_UNDEF) -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 /***** LONG ******************************************************************/ typedef struct { @@ -824,7 +824,7 @@ return fail == 0; } -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 static int test_long_32bit(void) { return test_intern(&long_test_package_32bit); @@ -858,7 +858,7 @@ int setup_tests(void) { -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 ADD_TEST(test_long_32bit); ADD_TEST(test_long_64bit); #endif
diff --git a/test/igetest.c b/test/igetest.c index a4b8cfa..5a9ebb5 100644 --- a/test/igetest.c +++ b/test/igetest.c
@@ -15,7 +15,7 @@ #include "internal/nelem.h" #include "testutil.h" -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 # define TEST_SIZE 128 # define BIG_TEST_SIZE 10240 @@ -438,7 +438,7 @@ int setup_tests(void) { -#if !OPENSSL_API_3 +#ifndef OPENSSL_NO_DEPRECATED_3_0 RAND_bytes(rkey, sizeof(rkey)); RAND_bytes(rkey2, sizeof(rkey2)); RAND_bytes(plaintext, sizeof(plaintext));