diff options
author | David Goulet <dgoulet@torproject.org> | 2021-01-28 12:04:37 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-01-28 12:04:37 -0500 |
commit | c6fb26695b1b84b287cc641f7bfaaaba32b67cde (patch) | |
tree | e5377731ac42df90ec56b8a831c8eb153a2ee081 /configure.ac | |
parent | 3ebf75993f8c64ea0bc022bde69ccdf879bcaeaf (diff) | |
parent | c48d25ac8d5cb8320a56a61cbee7754420d77309 (diff) | |
download | tor-c6fb26695b1b84b287cc641f7bfaaaba32b67cde.tar.gz tor-c6fb26695b1b84b287cc641f7bfaaaba32b67cde.zip |
Merge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1f2af57ef7..c7bda74c8b 100644 --- a/configure.ac +++ b/configure.ac @@ -937,13 +937,30 @@ LIBS="$TOR_OPENSSL_LIBS $LIBS" LDFLAGS="$TOR_LDFLAGS_openssl $LDFLAGS" CPPFLAGS="$TOR_CPPFLAGS_openssl $CPPFLAGS" +dnl Tor currently uses a number of APIs that are deprecated in OpenSSL 3.0.0 +dnl and later. We want to migrate away from them, but that will be a lot of +dnl work. (See ticket tor#40166.) For now, we disable the deprecation +dnl warnings. + +AC_MSG_CHECKING([for OpenSSL >= 3.0.0]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <openssl/opensslv.h> +#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER <= 0x30000000L +#error "you_have_version_3" +#endif + ]], [[]])], + [ AC_MSG_RESULT([no]) ], + [ AC_MSG_RESULT([yes]); + AC_DEFINE(OPENSSL_SUPPRESS_DEPRECATED, 1, [disable openssl deprecated-function warnings]) ]) + +AC_MSG_CHECKING([for OpenSSL < 1.0.1]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <openssl/opensslv.h> #if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000100fL #error "too old" #endif ]], [[]])], - [ : ], + [ AC_MSG_RESULT([no]) ], [ AC_MSG_ERROR([OpenSSL is too old. We require 1.0.1 or later. You can specify a path to a newer one with --with-openssl-dir.]) ]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |