summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-11-05 17:34:09 +0100
committerRichard Levitte <levitte@openssl.org>2019-11-07 11:37:25 +0100
commit00db8c60aaecd2ff9b0a5d9fd10c7771a1e1a73e (patch)
tree55a6f88db1ff6e53c4fdcf17b074672ff64e9263
parent936c2b9e933eacae80d3489e5f7316589f3e9a07 (diff)
Update source files for pre-3.0 deprecation
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10364)
-rw-r--r--crypto/asn1/asn1_lib.c2
-rw-r--r--crypto/bio/b_sock.c6
-rw-r--r--crypto/bn/bn_depr.c2
-rw-r--r--crypto/bn/bn_lib.c2
-rw-r--r--crypto/conf/conf_sap.c2
-rw-r--r--crypto/dh/dh_depr.c2
-rw-r--r--crypto/dsa/dsa_depr.c2
-rw-r--r--crypto/engine/eng_all.c5
-rw-r--r--crypto/err/err.c4
-rw-r--r--crypto/evp/e_old.c2
-rw-r--r--crypto/hmac/hmac.c2
-rw-r--r--crypto/pkcs12/p12_sbag.c2
-rw-r--r--crypto/rand/rand_lib.c2
-rw-r--r--crypto/rand/rand_win.c2
-rw-r--r--crypto/rsa/rsa_depr.c2
-rw-r--r--crypto/srp/srp_vfy.c2
-rw-r--r--crypto/x509/x509_d2.c2
-rw-r--r--crypto/x509/x509cset.c2
-rw-r--r--include/openssl/bio.h2
-rw-r--r--include/openssl/bn.h4
-rw-r--r--include/openssl/comp.h4
-rw-r--r--include/openssl/conf.h4
-rw-r--r--include/openssl/crypto.h16
-rw-r--r--include/openssl/dh.h4
-rw-r--r--include/openssl/dsa.h4
-rw-r--r--include/openssl/ec.h2
-rw-r--r--include/openssl/engine.h8
-rw-r--r--include/openssl/err.h2
-rw-r--r--include/openssl/evp.h6
-rw-r--r--include/openssl/idea.h2
-rw-r--r--include/openssl/lhash.h2
-rw-r--r--include/openssl/objects.h2
-rw-r--r--include/openssl/pkcs12.h2
-rw-r--r--include/openssl/rand.h2
-rw-r--r--include/openssl/rsa.h6
-rw-r--r--include/openssl/ssl.h14
-rw-r--r--include/openssl/stack.h2
-rw-r--r--include/openssl/ui.h4
-rw-r--r--include/openssl/x509.h6
-rw-r--r--include/openssl/x509_vfy.h6
-rw-r--r--include/openssl/x509v3.h2
-rw-r--r--ssl/methods.c2
-rw-r--r--ssl/ssl_lib.c4
43 files changed, 79 insertions, 78 deletions
diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index 6399de7c2a..52eb16ba9c 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -383,7 +383,7 @@ const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x)
return x->data;
}
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
unsigned char *ASN1_STRING_data(ASN1_STRING *x)
{
return x->data;
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 8e40d8644c..78bcffdb13 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -24,7 +24,7 @@
static int wsa_init_done = 0;
# endif
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
int BIO_get_host_ip(const char *str, unsigned char *ip)
{
BIO_ADDRINFO *res = NULL;
@@ -103,7 +103,7 @@ int BIO_sock_error(int sock)
return j;
}
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
struct hostent *BIO_gethostbyname(const char *name)
{
/*
@@ -195,7 +195,7 @@ int BIO_socket_ioctl(int fd, long type, void *arg)
return i;
}
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
int BIO_get_accept_socket(char *host, int bind_mode)
{
int s = INVALID_SOCKET;
diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c
index 4dbbdc3814..9c1c3d57c8 100644
--- a/crypto/bn/bn_depr.c
+++ b/crypto/bn/bn_depr.c
@@ -13,7 +13,7 @@
*/
#include <openssl/opensslconf.h>
-#if OPENSSL_API_0_9_8
+#ifdef OPENSSL_NO_DEPRECATED_0_9_8
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index bdd4caa21d..1e62b96874 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -15,7 +15,7 @@
#include "internal/constant_time.h"
/* This stuff appears to be completely unused, so is deprecated */
-#if !OPENSSL_API_0_9_8
+#ifndef OPENSSL_NO_DEPRECATED_0_9_8
/*-
* For a 32 bit machine
* 2 - 4 == 128
diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c
index 921ff77085..2c5ee2a131 100644
--- a/crypto/conf/conf_sap.c
+++ b/crypto/conf/conf_sap.c
@@ -27,7 +27,7 @@
static int openssl_configured = 0;
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
void OPENSSL_config(const char *appname)
{
OPENSSL_INIT_SETTINGS settings;
diff --git a/crypto/dh/dh_depr.c b/crypto/dh/dh_depr.c
index f0903ca20a..09403f6ad5 100644
--- a/crypto/dh/dh_depr.c
+++ b/crypto/dh/dh_depr.c
@@ -10,7 +10,7 @@
/* This file contains deprecated functions as wrappers to the new ones */
#include <openssl/opensslconf.h>
-#if OPENSSL_API_0_9_8
+#ifdef OPENSSL_NO_DEPRECATED_0_9_8
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/dsa/dsa_depr.c b/crypto/dsa/dsa_depr.c
index e97eaf124c..2b363e2642 100644
--- a/crypto/dsa/dsa_depr.c
+++ b/crypto/dsa/dsa_depr.c
@@ -20,7 +20,7 @@
#define xxxHASH EVP_sha1()
#include <openssl/opensslconf.h>
-#if OPENSSL_API_0_9_8
+#ifdef OPENSSL_NO_DEPRECATED_0_9_8
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/engine/eng_all.c b/crypto/engine/eng_all.c
index 0c5e4bdfd5..2f83b2ec18 100644
--- a/crypto/engine/eng_all.c
+++ b/crypto/engine/eng_all.c
@@ -15,9 +15,10 @@ void ENGINE_load_builtin_engines(void)
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
}
-#if (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)) \
- && !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
+# if (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__))
void ENGINE_setup_bsd_cryptodev(void)
{
}
+# endif
#endif
diff --git a/crypto/err/err.c b/crypto/err/err.c
index b56eec8414..28a5db8ad4 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -659,13 +659,13 @@ static void err_delete_thread_state(void *arg)
ERR_STATE_free(state);
}
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
void ERR_remove_thread_state(void *dummy)
{
}
#endif
-#if !OPENSSL_API_1_0_0
+#ifndef OPENSSL_NO_DEPRECATED_1_0_0
void ERR_remove_state(unsigned long pid)
{
}
diff --git a/crypto/evp/e_old.c b/crypto/evp/e_old.c
index 02b16d0f97..82e0c1282c 100644
--- a/crypto/evp/e_old.c
+++ b/crypto/evp/e_old.c
@@ -8,7 +8,7 @@
*/
#include <openssl/opensslconf.h>
-#if OPENSSL_API_0_9_8
+#ifdef OPENSSL_NO_DEPRECATED_0_9_8
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 17cc58717b..6d4d24d77b 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -86,7 +86,7 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
return rv;
}
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)
{
if (key && md)
diff --git a/crypto/pkcs12/p12_sbag.c b/crypto/pkcs12/p12_sbag.c
index 2b4ca65399..ccb9acb17e 100644
--- a/crypto/pkcs12/p12_sbag.c
+++ b/crypto/pkcs12/p12_sbag.c
@@ -12,7 +12,7 @@
#include <openssl/pkcs12.h>
#include "p12_local.h"
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid)
{
return PKCS12_get_attr_gen(bag->attrib, attr_nid);
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 3508cfb25c..c6b4ad3ae4 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -896,7 +896,7 @@ int RAND_bytes(unsigned char *buf, int num)
return rand_bytes_ex(NULL, buf, num);
}
-#if !OPENSSL_API_1_1_0 && !defined(FIPS_MODE)
+#if !defined(OPENSSL_NO_DEPRECATED_1_1_0) && !defined(FIPS_MODE)
int RAND_pseudo_bytes(unsigned char *buf, int num)
{
const RAND_METHOD *meth = RAND_get_rand_method();
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 5f67c87c3c..40b0de9209 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -163,7 +163,7 @@ int rand_pool_add_additional_data(RAND_POOL *pool)
return rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0);
}
-# if !OPENSSL_API_1_1_0 && !defined(FIPS_MODE)
+# if !defined(OPENSSL_NO_DEPRECATED_1_1_0) && !defined(FIPS_MODE)
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
{
RAND_poll();
diff --git a/crypto/rsa/rsa_depr.c b/crypto/rsa/rsa_depr.c
index c34c605859..ed63262645 100644
--- a/crypto/rsa/rsa_depr.c
+++ b/crypto/rsa/rsa_depr.c
@@ -13,7 +13,7 @@
*/
#include <openssl/opensslconf.h>
-#if OPENSSL_API_0_9_8
+#ifdef OPENSSL_NO_DEPRECATED_0_9_8
NON_EMPTY_TRANSLATION_UNIT
#else
diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c
index c4dd5153f2..9505d4265e 100644
--- a/crypto/srp/srp_vfy.c
+++ b/crypto/srp/srp_vfy.c
@@ -525,7 +525,7 @@ int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd)
return 1;
}
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* DEPRECATED: use SRP_VBASE_get1_by_user instead.
* This method ignores the configured seed and fails for an unknown user.
diff --git a/crypto/x509/x509_d2.c b/crypto/x509/x509_d2.c
index 5beb7034a7..cb0f84a7e8 100644
--- a/crypto/x509/x509_d2.c
+++ b/crypto/x509/x509_d2.c
@@ -74,7 +74,7 @@ int X509_STORE_load_store(X509_STORE *ctx, const char *uri)
}
/* Deprecated */
-#if OPENSSL_API_LEVEL < 3
+#ifndef OPENSSL_NO_DEPRECATED_3_0
int X509_STORE_load_locations(X509_STORE *ctx, const char *file,
const char *path)
{
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c
index f1992ddcf0..2350995239 100644
--- a/crypto/x509/x509cset.c
+++ b/crypto/x509/x509cset.c
@@ -91,7 +91,7 @@ const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl)
return crl->crl.nextUpdate;
}
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)
{
return crl->crl.lastUpdate;
diff --git a/include/openssl/bio.h b/include/openssl/bio.h
index f374b83324..ed9ecc6cca 100644
--- a/include/openssl/bio.h
+++ b/include/openssl/bio.h
@@ -704,7 +704,7 @@ int BIO_sock_error(int sock);
int BIO_socket_ioctl(int fd, long type, void *arg);
int BIO_socket_nbio(int fd, int mode);
int BIO_sock_init(void);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define BIO_sock_cleanup() while(0) continue
# endif
int BIO_set_tcp_ndelay(int sock, int turn_on);
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index beeca9e25f..7cfc791eab 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -67,7 +67,7 @@ extern "C" {
# define BN_FLG_CONSTTIME 0x04
# define BN_FLG_SECURE 0x08
-# if !OPENSSL_API_0_9_8
+# ifndef OPENSSL_NO_DEPRECATED_0_9_8
/* deprecated name for the flag */
# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
# define BN_FLG_FREE 0x8000 /* used for debugging */
@@ -539,7 +539,7 @@ BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
diff --git a/include/openssl/comp.h b/include/openssl/comp.h
index 4b2085749e..06ff58100f 100644
--- a/include/openssl/comp.h
+++ b/include/openssl/comp.h
@@ -41,8 +41,8 @@ int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
COMP_METHOD *COMP_zlib(void);
-#if !OPENSSL_API_1_1_0
-#define COMP_zlib_cleanup() while(0) continue
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
+# define COMP_zlib_cleanup() while(0) continue
#endif
# ifdef OPENSSL_BIO_H
diff --git a/include/openssl/conf.h b/include/openssl/conf.h
index 5e03991a3d..39bfe570c8 100644
--- a/include/openssl/conf.h
+++ b/include/openssl/conf.h
@@ -96,7 +96,7 @@ int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define OPENSSL_no_config() \
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
#endif
@@ -143,7 +143,7 @@ int CONF_modules_load_file(const char *filename, const char *appname,
unsigned long flags);
void CONF_modules_unload(int all);
void CONF_modules_finish(void);
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define CONF_modules_free() while(0) continue
#endif
int CONF_module_add(const char *name, conf_init_func *ifunc,
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 956fab5142..a6020fdd4c 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -42,7 +42,7 @@
*/
# include <openssl/symhacks.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/opensslv.h>
# endif
@@ -50,7 +50,7 @@
extern "C" {
#endif
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define SSLeay OpenSSL_version_num
# define SSLeay_version OpenSSL_version
# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
@@ -68,7 +68,7 @@ typedef struct {
int dummy;
} CRYPTO_dynlock;
-# endif /* OPENSSL_API_1_1_0 */
+# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
typedef void CRYPTO_RWLOCK;
@@ -238,7 +238,7 @@ int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* This function cleans up all "ex_data" state. It mustn't be called under
* potential race-conditions.
@@ -285,11 +285,11 @@ typedef struct crypto_threadid_st {
# define CRYPTO_THREADID_cpy(dest, src)
# define CRYPTO_THREADID_hash(id) (0UL)
-# if !OPENSSL_API_1_0_0
+# ifndef OPENSSL_NO_DEPRECATED_1_0_0
# define CRYPTO_set_id_callback(func)
# define CRYPTO_get_id_callback() (NULL)
# define CRYPTO_thread_id() (0UL)
-# endif /* OPENSSL_API_1_0_0 */
+# endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
# define CRYPTO_set_dynlock_create_callback(dyn_create_function)
# define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
@@ -297,7 +297,7 @@ typedef struct crypto_threadid_st {
# define CRYPTO_get_dynlock_create_callback() (NULL)
# define CRYPTO_get_dynlock_lock_callback() (NULL)
# define CRYPTO_get_dynlock_destroy_callback() (NULL)
-# endif /* OPENSSL_API_1_1_0 */
+# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
int CRYPTO_set_mem_functions(
void *(*m) (size_t, const char *, int),
@@ -370,7 +370,7 @@ int CRYPTO_mem_leaks(BIO *bio);
/* die if we have to */
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
# endif
# define OPENSSL_assert(e) \
diff --git a/include/openssl/dh.h b/include/openssl/dh.h
index 0dcb9fc157..1e39e86a33 100644
--- a/include/openssl/dh.h
+++ b/include/openssl/dh.h
@@ -23,7 +23,7 @@
# include <openssl/bio.h>
# include <openssl/asn1.h>
# include <openssl/types.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/bn.h>
# endif
# include <openssl/dherr.h>
@@ -40,7 +40,7 @@ extern "C" {
# define DH_FLAG_CACHE_MONT_P 0x01
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* Does nothing. Previously this switched off constant time behaviour.
*/
diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h
index c8d0c3334a..9697a9cafd 100644
--- a/include/openssl/dsa.h
+++ b/include/openssl/dsa.h
@@ -28,7 +28,7 @@ extern "C" {
# include <openssl/crypto.h>
# include <openssl/types.h>
# include <openssl/bn.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/dh.h>
# endif
# include <openssl/dsaerr.h>
@@ -40,7 +40,7 @@ extern "C" {
# define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
# define DSA_FLAG_CACHE_MONT_P 0x01
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* Does nothing. Previously this switched off constant time behaviour.
*/
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index c4b701a07d..1ffdb56c6f 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -22,7 +22,7 @@
# ifndef OPENSSL_NO_EC
# include <openssl/asn1.h>
# include <openssl/symhacks.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/bn.h>
# endif
# include <openssl/ecerr.h>
diff --git a/include/openssl/engine.h b/include/openssl/engine.h
index 816eb4e2e6..3c9648dc02 100644
--- a/include/openssl/engine.h
+++ b/include/openssl/engine.h
@@ -13,14 +13,14 @@
# pragma once
# include <openssl/macros.h>
-# if !OPENSSL_API_3
+# ifndef OPENSSL_NO_DEPRECATED_3_0
# define HEADER_ENGINE_H
# endif
# include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_ENGINE
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/bn.h>
# include <openssl/rsa.h>
# include <openssl/dsa.h>
@@ -326,7 +326,7 @@ int ENGINE_remove(ENGINE *e);
/* Retrieve an engine from the list by its unique "id" value. */
ENGINE *ENGINE_by_id(const char *id);
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define ENGINE_load_openssl() \
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL)
# define ENGINE_load_dynamic() \
@@ -500,7 +500,7 @@ int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
void *ENGINE_get_ex_data(const ENGINE *e, int idx);
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* This function previously cleaned up anything that needs it. Auto-deinit will
* now take care of it so it is no longer required to call this function.
diff --git a/include/openssl/err.h b/include/openssl/err.h
index 25ce42c48d..e5766ee241 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -332,7 +332,7 @@ int ERR_load_strings_const(const ERR_STRING_DATA *str);
int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
int ERR_load_ERR_strings(void);
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define ERR_load_crypto_strings() \
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
# define ERR_free_strings() while(0) continue
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 87c0169db2..06f8b1f1db 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -526,7 +526,7 @@ void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
# define EVP_CIPHER_CTX_name(c) EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(c))
# define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c))
# endif
# define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c))
@@ -726,7 +726,7 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
char *out, int *outl);
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c)
# define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c)
# endif
@@ -1005,7 +1005,7 @@ const EVP_CIPHER *EVP_sm4_ofb(void);
const EVP_CIPHER *EVP_sm4_ctr(void);
# endif
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define OPENSSL_add_all_algorithms_conf() \
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
| OPENSSL_INIT_ADD_ALL_DIGESTS \
diff --git a/include/openssl/idea.h b/include/openssl/idea.h
index 0d208683b3..3e46f2822d 100644
--- a/include/openssl/idea.h
+++ b/include/openssl/idea.h
@@ -51,7 +51,7 @@ void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out,
int *num);
void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define idea_options IDEA_options
# define idea_ecb_encrypt IDEA_ecb_encrypt
# define idea_set_encrypt_key IDEA_set_encrypt_key
diff --git a/include/openssl/lhash.h b/include/openssl/lhash.h
index 182104aa51..b1b5aa550a 100644
--- a/include/openssl/lhash.h
+++ b/include/openssl/lhash.h
@@ -98,7 +98,7 @@ void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define _LHASH OPENSSL_LHASH
# define LHASH_NODE OPENSSL_LH_NODE
# define lh_error OPENSSL_LH_error
diff --git a/include/openssl/objects.h b/include/openssl/objects.h
index 89aa623d73..9ea91c27c8 100644
--- a/include/openssl/objects.h
+++ b/include/openssl/objects.h
@@ -163,7 +163,7 @@ const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
int OBJ_new_nid(int num);
int OBJ_add_object(const ASN1_OBJECT *obj);
int OBJ_create(const char *oid, const char *sn, const char *ln);
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define OBJ_cleanup() while(0) continue
#endif
int OBJ_create_objects(BIO *in);
diff --git a/include/openssl/pkcs12.h b/include/openssl/pkcs12.h
index d16cf47750..51d6e8a485 100644
--- a/include/openssl/pkcs12.h
+++ b/include/openssl/pkcs12.h
@@ -61,7 +61,7 @@ typedef struct pkcs12_bag_st PKCS12_BAGS;
/* Compatibility macros */
-#if !OPENSSL_API_1_1_0
+#ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define M_PKCS12_bag_type PKCS12_bag_type
# define M_PKCS12_cert_bag_type PKCS12_cert_bag_type
diff --git a/include/openssl/rand.h b/include/openssl/rand.h
index ca7eceb37d..1cffab7c54 100644
--- a/include/openssl/rand.h
+++ b/include/openssl/rand.h
@@ -42,7 +42,7 @@ int RAND_set_rand_engine(ENGINE *engine);
RAND_METHOD *RAND_OpenSSL(void);
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# define RAND_cleanup() while(0) continue
# endif
int RAND_bytes(unsigned char *buf, int num);
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
index b70aef5cb5..eba0604455 100644
--- a/include/openssl/rsa.h
+++ b/include/openssl/rsa.h
@@ -23,7 +23,7 @@
# include <openssl/bio.h>
# include <openssl/crypto.h>
# include <openssl/types.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/bn.h>
# endif
# include <openssl/rsaerr.h>
@@ -81,13 +81,13 @@ extern "C" {
* but other engines might not need it
*/
# define RSA_FLAG_NO_BLINDING 0x0080
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
/*
* Does nothing. Previously this switched off constant time behaviour.
*/
# define RSA_FLAG_NO_CONSTTIME 0x0000
# endif
-# if !OPENSSL_API_0_9_8
+# ifndef OPENSSL_NO_DEPRECATED_0_9_8
/* deprecated name for the flag*/
/*
* new with 0.9.7h; the built-in RSA
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 9995b87e65..972e2ef827 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -22,7 +22,7 @@
# include <openssl/opensslconf.h>
# include <openssl/comp.h>
# include <openssl/bio.h>
-# if !OPENSSL_API_1_1_0
+# ifndef OPENSSL_NO_DEPRECATED_1_1_0
# include <openssl/x509.h>
# include <openssl/crypto.h>
# include <openssl/buffer.h>
@@ -1125,7 +1125,7 @@ size_t SSL_get_peer