]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
darwinssl: Fix exception when processing a client-side certificate file
authorNick Zitzmann <nickzman@gmail.com>
Wed, 17 May 2017 00:21:12 +0000 (19:21 -0500)
committerNick Zitzmann <nickzman@gmail.com>
Wed, 17 May 2017 00:21:12 +0000 (19:21 -0500)
if no error was raised by the API but the SecIdentityRef was null

Fixes #1450

lib/vtls/darwinssl.c

index 270b3ddfb64aa2482357c81364d5edd964fdb40b..041766541ea4d86c7e8bc4be860aab27ced1b249 100644 (file)
@@ -1404,7 +1404,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn,
     else
       err = CopyIdentityWithLabel(ssl_cert, &cert_and_key);
 
-    if(err == noErr) {
+    if(err == noErr && cert_and_key) {
       SecCertificateRef cert = NULL;
       CFTypeRef certs_c[1];
       CFArrayRef certs;