diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-12-27 20:57:33 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-12-27 22:18:08 +0000 |
commit | 2728caa6133edcf744eae4caa8f209beaaa523e3 (patch) | |
tree | 96e357c2b759eac40664fc72ce6ce7ba58e62fef | |
parent | 0943045108bbf4a59d93732a0453df834cff8353 (diff) |
nss: Don't ignore Curl_extract_certinfo() OOM failure
-rw-r--r-- | lib/vtls/nss.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 309edbe62..d05b36d5f 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -774,12 +774,17 @@ static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock) result = Curl_ssl_init_certinfo(conn->data, i); if(!result) { for(i = 0; cert; cert = cert2) { - Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data, - (char *)cert->derCert.data + cert->derCert.len); + result = Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data, + (char *)cert->derCert.data + + cert->derCert.len); + if(result) + break; + if(cert->isRoot) { CERT_DestroyCertificate(cert); break; } + cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA); CERT_DestroyCertificate(cert); } |