summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-11-05 17:28:50 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-07 11:37:25 +0100
commit936c2b9e933eacae80d3489e5f7316589f3e9a07 (patch)
treebcc8e013817b791df5b290c5ec1892e93969b5fc /crypto
parentChange the logic and behaviour surrounding '--api' and 'no-deprecated' (diff)
downloadopenssl-936c2b9e933eacae80d3489e5f7316589f3e9a07.tar.xz
openssl-936c2b9e933eacae80d3489e5f7316589f3e9a07.zip
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)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/aes/aes_ige.c2
-rw-r--r--crypto/asn1/asn1_item_list.h4
-rw-r--r--crypto/asn1/x_long.c2
-rw-r--r--crypto/bn/bn_prime.c2
-rw-r--r--crypto/conf/conf_def.c6
-rw-r--r--crypto/conf/conf_def.h2
-rw-r--r--crypto/conf/keysets.pl2
-rw-r--r--crypto/dsa/dsa_sign.c2
-rw-r--r--crypto/ec/ec_lib.c8
-rw-r--r--crypto/ec/ec_oct.c2
-rw-r--r--crypto/ec/ecdh_kdf.c2
-rw-r--r--crypto/err/err.c10
-rw-r--r--crypto/mem_dbg.c2
13 files changed, 23 insertions, 23 deletions
diff --git a/crypto/aes/aes_ige.c b/crypto/aes/aes_ige.c
index b95d3d4ba6..3300e518d2 100644
--- a/crypto/aes/aes_ige.c
+++ b/crypto/aes/aes_ige.c
@@ -9,7 +9,7 @@
#include "internal/cryptlib.h"
-#if OPENSSL_API_3
+#ifdef OPENSSL_NO_DEPRECATED_3_0
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/asn1/asn1_item_list.h b/crypto/asn1/asn1_item_list.h
index b0b607a0db..c8727e5790 100644
--- a/crypto/asn1/asn1_item_list.h
+++ b/crypto/asn1/asn1_item_list.h
@@ -78,7 +78,7 @@ static ASN1_ITEM_EXP *asn1_item_list[] = {
ASN1_ITEM_ref(IPAddressRange),
#endif
ASN1_ITEM_ref(ISSUING_DIST_POINT),
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
ASN1_ITEM_ref(LONG),
#endif
ASN1_ITEM_ref(NAME_CONSTRAINTS),
@@ -164,7 +164,7 @@ static ASN1_ITEM_EXP *asn1_item_list[] = {
ASN1_ITEM_ref(X509_SIG),
ASN1_ITEM_ref(X509_VAL),
ASN1_ITEM_ref(X509),
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
ASN1_ITEM_ref(ZLONG),
#endif
ASN1_ITEM_ref(INT32),
diff --git a/crypto/asn1/x_long.c b/crypto/asn1/x_long.c
index 89d5e838a3..76d6674b50 100644
--- a/crypto/asn1/x_long.c
+++ b/crypto/asn1/x_long.c
@@ -11,7 +11,7 @@
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
-#if OPENSSL_API_3
+#ifdef OPENSSL_NO_DEPRECATED_3_0
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c
index fd1c3c3088..ce5789ea3e 100644
--- a/crypto/bn/bn_prime.c
+++ b/crypto/bn/bn_prime.c
@@ -224,7 +224,7 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
}
#endif
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int BN_is_prime_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
BN_GENCB *cb)
{
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index a43225ecf7..a8581d7320 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -54,7 +54,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx);
static CONF *def_create(CONF_METHOD *meth);
static int def_init_default(CONF *conf);
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static int def_init_WIN32(CONF *conf);
#endif
static int def_destroy(CONF *conf);
@@ -83,7 +83,7 @@ CONF_METHOD *NCONF_default(void)
return &default_method;
}
-#if ! OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static CONF_METHOD WIN32_method = {
"WIN32",
def_create,
@@ -128,7 +128,7 @@ static int def_init_default(CONF *conf)
return 1;
}
-#if ! OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static int def_init_WIN32(CONF *conf)
{
if (conf == NULL)
diff --git a/crypto/conf/conf_def.h b/crypto/conf/conf_def.h
index 725c430c63..160611788f 100644
--- a/crypto/conf/conf_def.h
+++ b/crypto/conf/conf_def.h
@@ -56,7 +56,7 @@ static const unsigned short CONF_type_default[128] = {
0x0004, 0x0004, 0x0004, 0x0000, 0x0200, 0x0000, 0x0200, 0x0000,
};
-#if ! OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
static const unsigned short CONF_type_win32[128] = {
0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000,
diff --git a/crypto/conf/keysets.pl b/crypto/conf/keysets.pl
index 05b086f7fa..3c6eecd9ca 100644
--- a/crypto/conf/keysets.pl
+++ b/crypto/conf/keysets.pl
@@ -108,7 +108,7 @@ for ($i = 0; $i < 128; $i++) {
}
print "\n};\n\n";
-print "#if ! OPENSSL_API_3\n";
+print "#ifndef OPENSSL_NO_DEPRECATED_3_0\n";
print "static const unsigned short CONF_type_win32[128] = {";
for ($i = 0; $i < 128; $i++) {
print "\n " if ($i % 8) == 0;
diff --git a/crypto/dsa/dsa_sign.c b/crypto/dsa/dsa_sign.c
index 68501efab5..99ef0043eb 100644
--- a/crypto/dsa/dsa_sign.c
+++ b/crypto/dsa/dsa_sign.c
@@ -16,7 +16,7 @@ DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
return dsa->meth->dsa_do_sign(dgst, dlen, dsa);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
{
return dsa->meth->dsa_sign_setup(dsa, ctx_in, kinvp, rp);
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 08d018c4e6..168cf72973 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -116,7 +116,7 @@ void EC_GROUP_free(EC_GROUP *group)
OPENSSL_free(group);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
void EC_GROUP_clear_free(EC_GROUP *group)
{
if (!group)
@@ -540,7 +540,7 @@ int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
return group->meth->group_get_curve(group, p, a, b, ctx);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
const BIGNUM *b, BN_CTX *ctx)
{
@@ -849,7 +849,7 @@ int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point,
return 1;
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
EC_POINT *point, const BIGNUM *x,
const BIGNUM *y, BN_CTX *ctx)
@@ -887,7 +887,7 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group,
return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
const EC_POINT *point, BIGNUM *x,
BIGNUM *y, BN_CTX *ctx)
diff --git a/crypto/ec/ec_oct.c b/crypto/ec/ec_oct.c
index e9b1b87a5f..041c442b62 100644
--- a/crypto/ec/ec_oct.c
+++ b/crypto/ec/ec_oct.c
@@ -49,7 +49,7 @@ int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point,
y_bit, ctx);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
EC_POINT *point, const BIGNUM *x,
int y_bit, BN_CTX *ctx)
diff --git a/crypto/ec/ecdh_kdf.c b/crypto/ec/ecdh_kdf.c
index 8c4d530b11..000b12a515 100644
--- a/crypto/ec/ecdh_kdf.c
+++ b/crypto/ec/ecdh_kdf.c
@@ -48,7 +48,7 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
* The old name for ecdh_KDF_X9_63
* Retained for ABI compatibility
*/
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
const unsigned char *Z, size_t Zlen,
const unsigned char *sinfo, size_t sinfolen,
diff --git a/crypto/err/err.c b/crypto/err/err.c
index b636473ba6..b56eec8414 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -407,7 +407,7 @@ unsigned long ERR_get_error_all(const char **file, int *line,
return get_error_values(EV_POP, file, line, func, data, flags);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
unsigned long ERR_get_error_line_data(const char **file, int *line,
const char **data, int *flags)
{
@@ -442,7 +442,7 @@ unsigned long ERR_peek_error_all(const char **file, int *line,
return get_error_values(EV_PEEK, file, line, func, data, flags);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
unsigned long ERR_peek_error_line_data(const char **file, int *line,
const char **data, int *flags)
{
@@ -477,7 +477,7 @@ unsigned long ERR_peek_last_error_all(const char **file, int *line,
return get_error_values(EV_PEEK_LAST, file, line, func, data, flags);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
const char **data, int *flags)
{
@@ -621,7 +621,7 @@ const char *ERR_lib_error_string(unsigned long e)
return ((p == NULL) ? NULL : p->string);
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
const char *ERR_func_error_string(unsigned long e)
{
return NULL;
@@ -716,7 +716,7 @@ ERR_STATE *err_get_state_int(void)
return state;
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
ERR_STATE *ERR_get_state(void)
{
return err_get_state_int();
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c
index 1a08b2bb9e..779ad3cec9 100644
--- a/crypto/mem_dbg.c
+++ b/crypto/mem_dbg.c
@@ -209,7 +209,7 @@ static unsigned long mem_hash(const MEM *a)
return ret;
}
-#if !OPENSSL_API_3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int CRYPTO_mem_debug_push(const char *info, const char *file, int line)
{
return 0;