cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Question: CURLSSLOPT_NATIVE_CA for Download

Open ValdamireGido opened this issue 1 year ago • 1 comments

Is there a reason why prepareCommonDownload does not set CURLSSLOPT_NATIVE_CA? This leads to SSL verification error when downloading, but when doing regular get, it works fine.

I was able to solve this by adding: curl_easy_setopt(session.GetCurlHolder()->handle, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);

but am curious if there is a particular reason for this.

Version 1.10.4

Regards!

ValdamireGido avatar Aug 27 '24 15:08 ValdamireGido

Since based on the docs it's a OpenSSL only option and up until now I (and nobody I heard from) needed it to be set.

This to me sounds like a ssl option that should be able to be set. Do you want to create a PR?

COM8 avatar Aug 28 '24 15:08 COM8

Hey @COM8! Sorry for long silence. After looking into making PR I found out that the changes needed are already done in ff1f0bd4c2ebe983d4ae6d781838d7aacb545bc4 . There Fabian created a prepareCommonShared function that sets the curl option for both get and download requests.

So, I believe in next release this problem should be fixed. Thanks for your time!

ValdamireGido avatar Sep 08 '24 10:09 ValdamireGido

Then I'm closing it since it's already implemented

COM8 avatar Sep 22 '24 14:09 COM8