aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-09-12 19:25:58 -0400
committerNick Mathewson <nickm@torproject.org>2012-09-12 19:25:58 -0400
commitfeabf4148fc00a8535714ff72d9caa8303a73eaf (patch)
tree298ec14f814f14a397c745bc96a7d459be670059 /src/common/tortls.c
parenta73dec16c539fd957ab09f242cd44b0a0858cd38 (diff)
downloadtor-feabf4148fc00a8535714ff72d9caa8303a73eaf.tar
tor-feabf4148fc00a8535714ff72d9caa8303a73eaf.tar.gz
Drop support for openssl 0.9.7
097 hasn't seen a new version since 2007; we can drop support too. This lets us remove our built-in sha256 implementation, and some checks for old bugs.
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index a3485c768..841156db2 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -58,8 +58,8 @@
#include "container.h"
#include <string.h>
-#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,7)
-#error "We require OpenSSL >= 0.9.7"
+#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,8)
+#error "We require OpenSSL >= 0.9.8"
#endif
/* Enable the "v2" TLS handshake.
@@ -778,13 +778,8 @@ tor_cert_decode(const uint8_t *certificate, size_t certificate_len)
if (certificate_len > INT_MAX)
return NULL;
-#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,8)
- /* This ifdef suppresses a type warning. Take out this case once everybody
- * is using OpenSSL 0.9.8 or later. */
- x509 = d2i_X509(NULL, (unsigned char**)&cp, (int)certificate_len);
-#else
x509 = d2i_X509(NULL, &cp, (int)certificate_len);
-#endif
+
if (!x509)
return NULL; /* Couldn't decode */
if (cp - certificate != (int)certificate_len) {