Skip to content

Enable https transport for custom TLS streams#3850

Merged
ethomson merged 1 commit into
libgit2:masterfrom
wildart:custom-tls
Aug 4, 2016
Merged

Enable https transport for custom TLS streams#3850
ethomson merged 1 commit into
libgit2:masterfrom
wildart:custom-tls

Conversation

@wildart
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/settings.c Outdated
| 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

tkelman commented Jul 16, 2016

Bump. Thoughts on this without any of the ifdefs?

@wildart
Copy link
Copy Markdown
Contributor Author

wildart commented Jul 28, 2016

@ethomson Review, plz.

@Keno Keno mentioned this pull request Jul 28, 2016
@ethomson
Copy link
Copy Markdown
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