Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable https transport for custom TLS streams #3850

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

Merged
merged 1 commit into from
Aug 4, 2016

Conversation

wildart
Copy link
Contributor

@wildart wildart commented Jul 3, 2016

Unfortunately, custom TLS stream API is useless because https transport become disabled when any of secure connection frameworks aren't used.

@carlosmn
Copy link
Member

carlosmn commented Jul 6, 2016

This is something we've gone back and forth on a bit. Whether we should treat HTTPS or SSH any different just because git ships with them. We currently treat them as any other pluggable protocol, but there's been some confusion as it often ends up without HTTPS on the field.

The way to fix this should be to remove the special-casing, rather than adding more. If adding this define makes the code work sensibly, it shows that we don't actually need it and should instead let the TLS stream constructors error out instead.

@@ -29,7 +29,7 @@ int git_libgit2_features(void)
#ifdef GIT_THREADS
| GIT_FEATURE_THREADS
#endif
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CUSTOM_TLS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This defines are there to show how libgit2 was compiled. Adding this would make it meaningless.

@wildart
Copy link
Contributor Author

wildart commented Jul 6, 2016

Fair enough. Removing this make sense as TLS stream creation would fail if stream constructor is not provided.

@tkelman
Copy link
Contributor

tkelman commented Jul 16, 2016

Bump. Thoughts on this without any of the ifdefs?

@wildart
Copy link
Contributor Author

wildart commented Jul 28, 2016

@ethomson Review, plz.

@Keno Keno mentioned this pull request Jul 28, 2016
@ethomson
Copy link
Member

ethomson commented Aug 4, 2016

Yep! This looks good to me - thanks!

@ethomson ethomson merged commit 78b500b into libgit2:master Aug 4, 2016
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.

5 participants