#1313·cpr

Regeession: CURLSSLOPT_NATIVE_CA is no longer automatically set

Author: benespositoCreated Jul 10, 2026Updated Jul 19, 2026
LabelsBug :bug:

Description

!1128 introduced a regression where CURLSSLOPT_NATIVE_CA is no longer set on a Session's construction.

This change was motivated by #1127, which discovered that curl_easy_setopt was being used incorrectly. It was being used with the expectation that it was additive, i.e. each call added an option, but the issue points out that curl_easy_setopt is supposed to be called once, and that it cancels previously set options. Instead, options should be OR'ed together before calling curl_easy_setopt.

!1128 fixes this, but it moves some options from prepareCommonShared (which gets called before each request) to SetSslOptions, which needs to be explicitly called. One of these options is CURLSSLOPT_NATIVE_CA.

Example/How to Reproduce

Create any request that requires verifying ssl via the Windows cert store.

Possible Fix

No response

Where did you get it from?

conan

Additional Context/Your Environment

  • OS: Windows
  • cpr version: >=1.11.1
  • with_ssl=openssl