summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xConfigure7
-rw-r--r--crypto/opensslconf.h.in2
2 files changed, 6 insertions, 3 deletions
diff --git a/Configure b/Configure
index 139dbf0a0c..b97f9617db 100755
--- a/Configure
+++ b/Configure
@@ -1419,8 +1419,11 @@ if ($zlib)
}
}
-#Always build the library with OPENSSL_USE_DEPRECATED. This is overridden by OPENSSL_NO_DEPRECATED
-$cflags = "-DOPENSSL_USE_DEPRECATED $cflags";
+#Build the library with OPENSSL_USE_DEPRECATED if deprecation is not disabled
+if(!defined($disabled{"deprecated"}))
+ {
+ $cflags = "-DOPENSSL_USE_DEPRECATED $cflags";
+ }
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
my $shared_mark = "";
diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in
index 31a01c1c8b..faa33a496d 100644
--- a/crypto/opensslconf.h.in
+++ b/crypto/opensslconf.h.in
@@ -6,7 +6,7 @@
* deprecated functions then this will not work
*/
#if defined(OPENSSL_NO_DEPRECATED) && defined(OPENSSL_USE_DEPRECATED)
-#undef OPENSSL_USE_DEPRECATED
+#error "OPENSSL_USE_DEPRECATED has been defined, but OpenSSL has been built without support for deprecated functions"
#endif
/* Test for support for deprecated attribute */