From c58063b4f828f47e4a7ed6c8c6cbd286d1162afc Mon Sep 17 00:00:00 2001 From: Nick Zitzmann Date: Tue, 16 May 2017 19:21:12 -0500 Subject: 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 --- lib/vtls/darwinssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/vtls') diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 270b3ddfb..041766541 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; -- cgit v1.2.3