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

Skip to content

Conversation

Robrecht-VS
Copy link
Contributor

@Robrecht-VS Robrecht-VS commented Dec 19, 2024

// https://curl.se/libcurl/c/CURLOPT_SSL_OPTIONS.html
auto ssl_options = static_cast<long>(SSL_OPTIONS);
if (pj_context_get_native_ca(ctx)) {
ssl_options = ssl_options | CURLSSLOPT_NATIVE_CA;
Copy link
Member

Choose a reason for hiding this comment

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

From CI failures, it seems that CURLSSLOPT_NATIVE_CA is only available in "recent" Curl versions, so this will need to be conditioned by a #ifdef on the Curl version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your clarification @rouault , I have committed a fix.

Robrecht-VS and others added 2 commits December 24, 2024 11:56
#endif
CHECK_RET(ctx, curl_easy_setopt(handle, CURLOPT_SSL_OPTIONS, ssl_options));
#else
#if CURL_AT_LEAST_VERSION(7, 71, 0)
Copy link
Member

Choose a reason for hiding this comment

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

It looks to me that this branch ( SSL_OPTIONS not defined but curl >= 7.71) cannot be taken as SSL_OPTIONS is anterior to 7.71

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understand, SSL_OPTIONS is a preprocessor definition that is specific to PROJ, it is not defined by curl. It was introduced in this pull request: #3936

Copy link
Member

Choose a reason for hiding this comment

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

ah indeed, I missed that. Looks ok then

@rouault rouault added this to the 9.6.0 milestone Dec 24, 2024
@rouault rouault merged commit 68ad9e8 into OSGeo:master Dec 24, 2024
25 checks passed
Robrecht-VS added a commit to Robrecht-VS/PROJ_native_ca that referenced this pull request Feb 26, 2025
…J_NATIVE_CA to be able to configure curl to use the operating system CA store. (OSGeo#4356)

Fixes OSGeo#4338
# Conflicts:
#	src/networkfilemanager.cpp
Robrecht-VS added a commit to Robrecht-VS/PROJ_native_ca that referenced this pull request Feb 26, 2025
…J_NATIVE_CA to be able to configure curl to use the operating system CA store. (OSGeo#4356)

Fixes OSGeo#4338
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.

Possibility to set CURLSSLOPT_NATIVE_CA through proj.ini

2 participants