Skip to content

Support for SSL_CERT_FILE and SSL_CERT_DIR environment variables #8

Description

@traversaro

I am in an environment where I need to specify the certificates to use via the SSL_CERT_FILE environment variables, that is working fine with the curl command line tool, and with OpenSSL-based libraries.

When I was trying to use ccache-storage-http-cpp, I noticed that the access to my https server that needed the certificates pointed to SSL_CERT_FILE was not working, and that was a bit surprising for me as curl cli was working fine.

It turns out that in curl, the environment variables are handled at the tool level, not at the library level, see https://github.com/curl/curl/blob/curl-8_21_0/src/tool_operate.c#L2227-L2244 . So for tools that use libcurl to support SSL_CERT_FILE and SSL_CERT_DIR, the tool itself needs to read these env variables, and pass them down to libcurl.

Interestingly, ccache-storage-http-go already supports and out of the box, as in go this env variables are handled at the library level, see https://cs.opensource.google/go/go/+/master:src/crypto/x509/root.go;l=127?q=SSL_CERT_FILE&ss=go%2Fgo .

Would you be interested in a PR that adds support for SSL_CERT_FILE and SSL_CERT_DIR environment variables also in ccache-storage-http-cpp ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions