aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/gskit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vtls/gskit.c')
-rw-r--r--lib/vtls/gskit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c
index e1dd9b6b0..2ccb9e47b 100644
--- a/lib/vtls/gskit.c
+++ b/lib/vtls/gskit.c
@@ -875,9 +875,8 @@ static CURLcode gskit_connect_step3(struct connectdata *conn, int sockindex)
curl_X509certificate x509;
curl_asn1Element *p;
- if(!cert)
+ if(Curl_parseX509(&x509, cert, certend))
return CURLE_SSL_PINNEDPUBKEYNOTMATCH;
- Curl_parseX509(&x509, cert, certend);
p = &x509.subjectPublicKeyInfo;
result = Curl_pin_peer_pubkey(data, ptr, p->header, p->end - p->header);
if(result) {