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
This commit is contained in:
Nick Zitzmann 2017-05-16 19:21:12 -05:00
parent 32c27f9e98
commit c58063b4f8
1 changed files with 1 additions and 1 deletions

View 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;