Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See https://tickets.metabrainz.org/browse/MBH-363 - mb.org is at some
point going to move to HTTPS (even for the webservice). Without calling
ne_ssl_trust_default_ca
, connections to caa.org fail because thecertificate issuer is not trusted.
With this patch,
ne_ssl_trust_default_ca
is called whenever the schemeused to create the
ne_session
object is "https". This is the case ifthe port used is 443.
Unconditionally calling
ne_ssl_trust_default_ca
does not work becauseits implementation relies on an ssl context being set up on the session,
which is only done by libneon if the scheme is "https". If
ne_ssl_trust_default_ca
is called on anne_session
without an sslcontext, a segfault happens.
The condition is hardcoded to port 443 at the moment because I can't
test anything else. Also, a quick look at
ne_session_create
showedthat it internally sets a port to 443 as well, so I can't be sure that
it would really work with ports other than 443.
Fixes https://tickets.metabrainz.org/browse/LMB-47