Made it an error to define OPENSSL_USE_DEPRECATED if OpenSSL has been built

with OPENSSL_NO_DEPRECATED defined

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell 2014-12-18 15:03:09 +00:00
parent bd2bd374b3
commit c0fc27f88e
2 changed files with 6 additions and 3 deletions

View File

@ -1419,8 +1419,11 @@ if ($zlib)
} }
} }
#Always build the library with OPENSSL_USE_DEPRECATED. This is overridden by OPENSSL_NO_DEPRECATED #Build the library with OPENSSL_USE_DEPRECATED if deprecation is not disabled
if(!defined($disabled{"deprecated"}))
{
$cflags = "-DOPENSSL_USE_DEPRECATED $cflags"; $cflags = "-DOPENSSL_USE_DEPRECATED $cflags";
}
# You will find shlib_mark1 and shlib_mark2 explained in Makefile.org # You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
my $shared_mark = ""; my $shared_mark = "";

View File

@ -6,7 +6,7 @@
* deprecated functions then this will not work * deprecated functions then this will not work
*/ */
#if defined(OPENSSL_NO_DEPRECATED) && defined(OPENSSL_USE_DEPRECATED) #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 #endif
/* Test for support for deprecated attribute */ /* Test for support for deprecated attribute */