diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-05-21 11:54:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-21 11:54:13 -0400 |
commit | 0b7bf3585a378bca4fc5bb551af3c37d517fdf28 (patch) | |
tree | 733dd2544d8e4f2a26cae9c258b9f6815bf192c2 /src/common/tortls.c | |
parent | a35d22479b55c7eaed2ddbbd85fcbf3328751fbe (diff) | |
download | tor-0b7bf3585a378bca4fc5bb551af3c37d517fdf28.tar.gz tor-0b7bf3585a378bca4fc5bb551af3c37d517fdf28.zip |
Generate error ASAP if building with too-old openssl
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index ca3291b499..ca7b15fcd7 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -43,13 +43,19 @@ #pragma GCC diagnostic ignored "-Wredundant-decls" #endif +#include <openssl/opensslv.h> +#include "crypto.h" + +#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,0,0) +#error "We require OpenSSL >= 1.0.0" +#endif + #include <openssl/ssl.h> #include <openssl/ssl3.h> #include <openssl/err.h> #include <openssl/tls1.h> #include <openssl/asn1.h> #include <openssl/bio.h> -#include <openssl/opensslv.h> #include <openssl/bn.h> #include <openssl/rsa.h> @@ -68,17 +74,12 @@ #include "compat_libevent.h" #endif -#include "crypto.h" #include "tortls.h" #include "util.h" #include "torlog.h" #include "container.h" #include <string.h> -#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,0,0) -#error "We require OpenSSL >= 1.0.0" -#endif - /* Enable the "v2" TLS handshake. */ #define V2_HANDSHAKE_SERVER |