New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SecureTransport on OS X #2997
Conversation
5d46db3
to
41def48
Compare
I'm pretty happy about not linking against OpenSSL at all.
|
41def48
to
4815872
Compare
|
ad9c044
to
8411b5b
Compare
So many ❤️ for you. |
4c7c9d4
to
a077587
Compare
There is still of course libssh2 which will still link against openssl, so we're not quite free of threading nonsense yet, but someone was trying to upstream a SecureTransport version. |
343d202
to
f9b38af
Compare
Man, I'm excited about having this. Very clean implementation. |
62cd829
to
a8c64a9
Compare
@Therzok @nulltoken btw you should be able to write an implementation of the |
@nulltoken Should we make the magic happen? |
@carlosmn I can see the definition, but can't find where to hook it. Any tips? |
That function doesn't exist yet, as that depends on My idea was to have a function like |
Lgtm 👍
|
a8c64a9
to
3a49e3a
Compare
262dcf5
to
b50f0cd
Compare
return -1; | ||
} | ||
|
||
if ((ret = SSLCopyPeerTrust(st->ctx, &trust)) != noErr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fails, is it possible for trust
to remain unset (and then we subsequently try to CFRelease
it at line 81)? Which is to say should trust
have a default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it should be SecTrustRef trust = NULL
.
This looks great to me (aside from that one question). VERY EXCITED FOR THIS. |
b50f0cd
to
a6c23c0
Compare
As an alternative to OpenSSL when we're on OS X. This one can actually take advantage of stacking the streams.
Instead, provide git_tls_stream_new() to ask for the most appropriate encrypted stream and use it in our HTTP transport.
This is what it's meant all along, but now we actually have multiple implementations, it's clearer to use the name of the library.
a6c23c0
to
a93db93
Compare
Do not automatically fail on a bad certificate, but let the caller decide. This means we don't need our switch on errors anymore but can return a string representation from the security framework.
Anything SSL is deprecated. Let's make sure we don't try to use SSL v3 when talking to the server.
On close, we might get a return code which looks like an error but just means that the other side closed gracefully. Handle that.
a93db93
to
44b769e
Compare
We have successfully eliminated the scourge of OpenSSL on another platform. All thanks be to @carlosmn . |
Apple provides a TLS communication library which is included with the OS, thead-safe by itself and generally a better sport than OpenSSL.
Custom certificate checking is still not implemented, but the other clone tests do work.
GIT_SSL
toGIT_OPENSSL
as that's what it really means