32 lines
1016 B
Diff
32 lines
1016 B
Diff
--- lib/fetch/common.c 2016-09-14 06:03:01.225000000 +0200
|
|
+++ lib/fetch/common.c 2016-09-14 06:03:59.355000000 +0200
|
|
@@ -754,17 +754,17 @@
|
|
NID_commonName, lastpos)) != -1)
|
|
loc = lastpos;
|
|
|
|
- if (loc > -1) {
|
|
- nameentry = X509_NAME_get_entry(subject, loc);
|
|
- namedata = X509_NAME_ENTRY_get_data(nameentry);
|
|
- cnlen = ASN1_STRING_to_UTF8(&cn, namedata);
|
|
- if (ip == NULL &&
|
|
- fetch_ssl_hname_match(host, strlen(host), (const char *)cn, cnlen))
|
|
- ret = 1;
|
|
- else if (ip != NULL && fetch_ssl_ipaddr_match(ip, (const char *)cn, cnlen))
|
|
- ret = 1;
|
|
- OPENSSL_free(cn);
|
|
- }
|
|
+ if (loc > -1) {
|
|
+ nameentry = X509_NAME_get_entry(subject, loc);
|
|
+ namedata = X509_NAME_ENTRY_get_data(nameentry);
|
|
+ cnlen = ASN1_STRING_to_UTF8(&cn, namedata);
|
|
+ if (ip == NULL &&
|
|
+ fetch_ssl_hname_match(host, strlen(host), (const char *)cn, cnlen))
|
|
+ ret = 1;
|
|
+ else if (ip != NULL && fetch_ssl_ipaddr_match(ip, (const char *)cn, cnlen))
|
|
+ ret = 1;
|
|
+ OPENSSL_free(cn);
|
|
+ }
|
|
return (ret);
|
|
}
|
|
|