Skip to content
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

Option to pass a trusted server certificate when cloning #430

Merged
merged 2 commits into from
Dec 29, 2014
Merged

Option to pass a trusted server certificate when cloning #430

merged 2 commits into from
Dec 29, 2014

Conversation

jaanus
Copy link
Contributor

@jaanus jaanus commented Dec 29, 2014

This fixes #414 by allowing the user to pass a trusted root certificate when cloning. This is necessary on OS X in sandboxed apps, as the libgit2/OpenSSL in a sandboxed app cannot for some reason access the system trust store for root certificates, and cloning with HTTPS fails.

Since I saw that all remote operations already have an options dictionary, I figured it makes the most sense to just add this option there. The downside is that the server certificate must be specified for all operations. Another option would be to have some kind of global options/configuration, but Objective-Git does not seem to have this notion, and I wasn’t sure how to go about adding it.

If we choose this API style to specify the cert, then I suppose a similar option should be added to all remote operations, but I figured I’d just start with one to kick this off.

@jspahrsummers jspahrsummers self-assigned this Dec 29, 2014
@jspahrsummers
Copy link
Contributor

Looks great, thank you! ✨

jspahrsummers added a commit that referenced this pull request Dec 29, 2014
Option to pass a trusted server certificate when cloning
@jspahrsummers jspahrsummers merged commit 5021887 into libgit2:master Dec 29, 2014
@jspahrsummers jspahrsummers removed their assignment May 22, 2015
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.

Fix SSL certificate error / better support for libgit2 SSL certificate check callbacks
2 participants