From: Nick Zitzmann Date: Wed, 17 May 2017 00:21:12 +0000 (-0500) Subject: darwinssl: Fix exception when processing a client-side certificate file X-Git-Tag: curl-7_54_1~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c58063b4f828f47e4a7ed6c8c6cbd286d1162afc;p=thirdparty%2Fcurl.git darwinssl: Fix exception when processing a client-side certificate file if no error was raised by the API but the SecIdentityRef was null Fixes #1450 --- diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 270b3ddfb6..041766541e 100644 --- a/lib/vtls/darwinssl.c +++ b/lib/vtls/darwinssl.c @@ -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;