aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-02-07 08:38:59 -0500
committerNick Mathewson <nickm@torproject.org>2017-02-07 08:38:59 -0500
commit05ec055c417c80bf7b13914fade70a72f11accc5 (patch)
tree25c0779abbcda5c23f7547fd5a33adfc6e9117f1 /src/common/tortls.c
parent332543baedcf651b75722e5d4626c62fdd24ef60 (diff)
parent51675f97d30e48da68f2cf538f7f805f51af4c36 (diff)
downloadtor-05ec055c417c80bf7b13914fade70a72f11accc5.tar.gz
tor-05ec055c417c80bf7b13914fade70a72f11accc5.zip
Merge branch 'maint-0.2.4' into maint-0.2.5
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index d637a8e4d9..221b47e009 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -2708,6 +2708,10 @@ dn_indicates_v3_cert(X509_NAME *name)
len = ASN1_STRING_to_UTF8(&s, str);
if (len < 0)
return 0;
+ if (len < 4) {
+ OPENSSL_free(s);
+ return 1;
+ }
r = fast_memneq(s + len - 4, ".net", 4);
OPENSSL_free(s);
return r;