Skip to content
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

SSL_OPTIONS: set SSL options on Curl library #3936

Merged
merged 3 commits into from Nov 2, 2023
Merged

Conversation

ollira
Copy link
Contributor

@ollira ollira commented Oct 30, 2023

I would like to suggest a build-time option for adjusting Curl SSL options on PROJ. The default Curl SSL options appear to be more pedantic on certificate revocation checks than web browsers are. It could be discussed, if fail-hard checking is needed, when grid data downloads are concerned. See https://en.wikipedia.org/wiki/Certificate_revocation for some general info.

PROJ has the environment variable PROJ_UNSAFE_SSL for turning off all SSL checks. However, I would like to be able to use CURLSSLOPT_NO_REVOKE option in some environments, and keep all the other SSL checks enabled.

After the code change suggested in this pull request, CURLSSLOPT_NO_REVOKE could be selected at build-time by this kind of addition to PROJ cmake command:
-DCMAKE_CXX_FLAGS="-DSSL_OPTIONS=2"

Curl SSL options are described in https://curl.se/libcurl/c/CURLOPT_SSL_OPTIONS.html

  • Closes #xxxx
  • Tests added
  • Added clear title that can be used to generate release notes
  • Fully documented, including updating docs/source/*.rst for new API

@rouault
Copy link
Member

rouault commented Oct 30, 2023

I believe it would be desirable to have a (mark_as_advanced) CMake option in CMakeLists.txt to enable this, as a minimum documentation for that functionality

@ollira
Copy link
Contributor Author

ollira commented Oct 31, 2023

I added SSL_OPTIONS example to CMakeLists.txt (commented out). If there is a better way to present numeric options in cmake, let me know.

CMakeLists.txt Outdated Show resolved Hide resolved
@rouault rouault added this to the 9.4.0 milestone Nov 2, 2023
@rouault rouault merged commit dc184bd into OSGeo:master Nov 2, 2023
18 of 21 checks passed
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.

None yet

2 participants