aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-14 12:17:24 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-14 12:17:24 -0400
commitdf4fa92a88dbeadcc85ea28ac52af006e9e1466a (patch)
tree860b5700c73de5a6702c8a4ebec0b7bd6bf86ed6 /src/common/tortls.c
parenta427a7c479d633ad74819729eb2412c5c5e9e97e (diff)
parent71aacbe427e2d0c2b970bdc81db4f96c506dd7f3 (diff)
downloadtor-df4fa92a88dbeadcc85ea28ac52af006e9e1466a.tar.gz
tor-df4fa92a88dbeadcc85ea28ac52af006e9e1466a.zip
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 1cb6ca8777..0395205228 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -215,7 +215,9 @@ tor_tls_log_one_error(tor_tls_t *tls, unsigned long err,
case SSL_R_HTTP_REQUEST:
case SSL_R_HTTPS_PROXY_REQUEST:
case SSL_R_RECORD_LENGTH_MISMATCH:
+#ifndef OPENSSL_1_1_API
case SSL_R_RECORD_TOO_LARGE:
+#endif
case SSL_R_UNKNOWN_PROTOCOL:
case SSL_R_UNSUPPORTED_PROTOCOL:
severity = LOG_INFO;
@@ -891,7 +893,11 @@ tor_tls_cert_is_valid(int severity,
cert_key = X509_get_pubkey(cert->cert);
if (check_rsa_1024 && cert_key) {
RSA *rsa = EVP_PKEY_get1_RSA(cert_key);
+#ifdef OPENSSL_1_1_API
+ if (rsa && RSA_bits(rsa) == 1024)
+#else
if (rsa && BN_num_bits(rsa->n) == 1024)
+#endif
key_ok = 1;
if (rsa)
RSA_free(rsa);