aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2009-10-14 02:32:27 +0000
committerGunter Knauf <gk@gknw.de>2009-10-14 02:32:27 +0000
commit6daede08cb3ad27095cf9d41ac9f8761970bcb3a (patch)
tree01f15d7f66894a845b1548c5c5bce4582484f157 /lib
parent3669ff3c1e499deaac9a4550155298874d026a28 (diff)
we only need to call ASN1_STRING_length() if ASN1_STRING_type() detects UTF-8,
else ASN1_STRING_to_UTF8() returns the string length.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 2ea3b2f55..8cf834b14 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1176,8 +1176,8 @@ static CURLcode verifyhost(struct connectdata *conn,
conditional in the future when OpenSSL has been fixed. Work-around
brought by Alexis S. L. Carvalho. */
if(tmp) {
- j = ASN1_STRING_length(tmp);
if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
+ j = ASN1_STRING_length(tmp);
if(j >= 0) {
peer_CN = OPENSSL_malloc(j+1);
if(peer_CN) {