From bdb396ef2af421a50e69e9ef47cfa891fc937fcc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 5 May 2013 23:15:27 +0200 Subject: servercert: allow empty subject Bug: http://curl.haxx.se/bug/view.cgi?id=1220 Patch by: John Gardiner Myers --- lib/ssluse.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/ssluse.c b/lib/ssluse.c index a6709d933..b4bd31493 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -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); -- cgit v1.2.3