SecureTransport: handle NULL trust on success by carlosmn · Pull Request #3886 · libgit2/libgit2 · GitHub
Skip to content

SecureTransport: handle NULL trust on success#3886

Merged
ethomson merged 1 commit into
masterfrom
cmn/copypeertrust-null
Aug 5, 2016
Merged

SecureTransport: handle NULL trust on success#3886
ethomson merged 1 commit into
masterfrom
cmn/copypeertrust-null

Conversation

@carlosmn

@carlosmn carlosmn commented Aug 5, 2016

Copy link
Copy Markdown
Member

The SSLCopyPeerTrust call can succeed but fail to return a trust
object if it can't load the certificate chain and thus cannot check the
validity of a certificate. This can lead to us calling CFRelease on a
NULL trust object, causing a crash.

Handle this by returning ECERTIFICATE.

This may or may not solve #3885 /cc @the-kenny

The `SSLCopyPeerTrust` call can succeed but fail to return a trust
object if it can't load the certificate chain and thus cannot check the
validity of a certificate. This can lead to us calling `CFRelease` on a
`NULL` trust object, causing a crash.

Handle this by returning ECERTIFICATE.
@ethomson ethomson merged commit 56bbdf9 into master Aug 5, 2016
@ethomson ethomson deleted the cmn/copypeertrust-null branch January 9, 2019 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants