Skip to content

[bug]Cannot use repositories with a custom CA and one with a system one at the same time #18967

@numo68

Description

@numo68

Describe the bug

Debian bookworm, Conan 2.20.1

Hello,

not sure whether this is a bug or a feature request. I need to access both the conancenter and the repository on the organization's infrastructure. The infrastructure uses a proxy to go outside. The Linux (actually a container) is configured by copying the proxy certificate to /usr/local/share/ca-certificates/xxx-ca.crt, then running update-ca-certificates. This is enough for curl so the configuration is valid, but Conan seems to ignore it.

# conan remote list
conancenter: https://center2.conan.io [Verify SSL: True, Enabled: True]
xxx-fed: https://our.org/artifactory/api/conan/xxx-fed [Verify SSL: True, Enabled: True]
# curl https://center2.conan.io/v1/ping [OK]
# curl https://our.org/artifactory/api/conan/xxx-fed/v1/ping [Also OK]
# conan create ...
ERROR: Package 'xxx/1.0.0' not resolved: HTTPSConnectionPool(host='center2.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))
# conan create -cc core.net.http:cacert_path=/usr/local/share/ca-certificates/xxx-ca.crt ...
ERROR: Package 'xxx/1.0.0' not resolved: HTTPSConnectionPool(host='our.org', port=443): Max retries exceeded with url: /artifactory/api/conan/xxx-fed/v1/ping (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:992)')))

I know from my own experience that CA handling is less than optimal with Python based software, so this is not that surprising. Is there any trick to use both system and user-provided CA certificates, except switching the verification for one or another remote? Perhaps specify the CA per-remote in remotes.json?

Thanks

How to reproduce it

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions