summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-04 23:00:33 -0500
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-07 20:53:18 -0500
commit98186eb4e4aef6262ed6b0f499348defa2c26893 (patch)
tree38ddc0aea1be4b31a4a48d74dc307ad30288af47 /crypto/bn/bn_lib.c
parentcddd424a5bda94e238e4ff06c0efc80cff3b07d1 (diff)
Backwards-compatibility subject to OPENSSL_API_COMPAT
Provide backwards-compatiblity for functions, macros and include files if OPENSSL_API_COMPAT is either not defined or defined less than the version number of the release in which the feature was deprecated. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index b9e96b553e..6393a34f8a 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -65,9 +65,10 @@
#include <limits.h>
#include "internal/cryptlib.h"
#include "bn_lcl.h"
+#include <openssl/opensslconf.h>
/* This stuff appears to be completely unused, so is deprecated */
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x00908000L
/*-
* For a 32 bit machine
* 2 - 4 == 128
@@ -258,7 +259,7 @@ void BN_free(BIGNUM *a)
if (a->flags & BN_FLG_MALLOCED)
OPENSSL_free(a);
else {
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x00908000L
a->flags |= BN_FLG_FREE;
#endif
a->d = NULL;