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

Some fixes for `curl_global_sslset()` when built with a single SSL backend #3346

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@dscho
Copy link
Contributor

dscho commented Dec 6, 2018

While working on #3345, I realized that there were a couple of issues with the curl_global_sslset() when built with a single SSL backend, resulting in an incorrect error messages in one case, and in another case an error when we should have succeeded.

This PR fixes both issues.

Show resolved Hide resolved lib/vtls/vtls.c Outdated

dscho added some commits Dec 6, 2018

.gitattributes: make tabs in indentation a visible error
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
curl_global_sslset(): id == -1 is not necessarily an error
It is allowed to call that function with id set to -1, specifying the
backend by the name instead. We should imitate what is done further down
in that function to allow for that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
curl_global_sslset(): fix wrong return value
When compiled with a single SSL backend, Curl_ssl is never set to
Curl_ssl_multi, but to that single backend from the beginning.

When the caller tries to set the SSL backend to a different backend than
the one that was compiled in, in this scenario we should not say that it
is too late to set the SSL backend, but that it is an unknown backend to
begin with.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

@dscho dscho force-pushed the dscho:ssl-backend-fixes branch from 1901970 to 639f6f7 Dec 6, 2018

@bagder

bagder approved these changes Dec 7, 2018

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Dec 7, 2018

Thanks!

@bagder bagder closed this in 2456152 Dec 7, 2018

@dscho dscho deleted the dscho:ssl-backend-fixes branch Dec 7, 2018

@dscho

This comment has been minimized.

Copy link
Contributor

dscho commented Dec 7, 2018

@bagder thank you so much! I would also like to take a moment to thank you for being an excellent open source maintainer. You know, I strive to imitate you in your welcoming, gentle and inviting manners?

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Dec 7, 2018

Thank you. It is certainly good to know that my efforts pay off. Getting praise from equals is the highest form of flattery I can imagine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment