mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 15:50:48 -04:00
servercert: allow empty subject
Bug: http://curl.haxx.se/bug/view.cgi?id=1220 Patch by: John Gardiner Myers
This commit is contained in:
parent
6add1901a1
commit
bdb396ef2a
@ -2205,14 +2205,7 @@ static CURLcode servercert(struct connectdata *conn,
|
||||
|
||||
rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert),
|
||||
buffer, BUFSIZE);
|
||||
if(rc) {
|
||||
if(strict)
|
||||
failf(data, "SSL: couldn't get X509-subject!");
|
||||
X509_free(connssl->server_cert);
|
||||
connssl->server_cert = NULL;
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
infof(data, "\t subject: %s\n", buffer);
|
||||
infof(data, "\t subject: %s\n", rc?"[NONE]":buffer);
|
||||
|
||||
certdate = X509_get_notBefore(connssl->server_cert);
|
||||
asn1_output(certdate, buffer, BUFSIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user