Skip to content

Support for using the OS certificate stores #451

@dactylo

Description

@dactylo

Hi, we're using the Python API in a Windows env, where corporate CAs are deployed through the Windows cert store.

IIUC there is no built-in way to handle (what I assume is) this very common scenario.

When no ca_certs arg or SHOTGUN_API_CACERTS is set, the API falls back to using its certifi CA bundle via Shotgun._get_certs_file().

We've worked around this locally by monkeypatching the vendored httplib2, but obviously this is not ideal. We also considered dumping out the OS store to a file on initialization and pointing to that- again, not ideal.

Would there be any issue with:

  • Allowing _get_certs_file() to return None on Windows (and possibly macOS) when there is no CA file specified, either via init or SHOTGUN_API_CACERTS
  • Updating the vendored httplib2 so ca_certs=None uses ssl.create_default_context()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions