Skip to content

Commit 56bbdf9

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#3886 from libgit2/cmn/copypeertrust-null
SecureTransport: handle NULL trust on success
2 parents c550c92 + 9884dd6 commit 56bbdf9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stransport_stream.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ int stransport_connect(git_stream *stream)
6767
if ((ret = SSLCopyPeerTrust(st->ctx, &trust)) != noErr)
6868
goto on_error;
6969

70+
if (!trust)
71+
return GIT_ECERTIFICATE;
72+
7073
if ((ret = SecTrustEvaluate(trust, &sec_res)) != noErr)
7174
goto on_error;
7275

0 commit comments

Comments
 (0)