Merge pull request #3886 from libgit2/cmn/copypeertrust-null

SecureTransport: handle NULL trust on success
This commit is contained in:
Edward Thomson 2016-08-05 14:23:29 -04:00 committed by GitHub
commit 56bbdf9349

View File

@ -67,6 +67,9 @@ int stransport_connect(git_stream *stream)
if ((ret = SSLCopyPeerTrust(st->ctx, &trust)) != noErr)
goto on_error;
if (!trust)
return GIT_ECERTIFICATE;
if ((ret = SecTrustEvaluate(trust, &sec_res)) != noErr)
goto on_error;