WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Update docs on SSL certificate location configuration #56

@ericjmcd

Description

@ericjmcd

Env: python3.8 on Ubuntu 20.04 running tcms_api 12.2

In testing with the default Kiwi Docker setup, I found that after I had installed the ca.crt (retrieved from static/ca.crt and copied to /etc/share/ca-certificates/ and installed with sudo dpkg-reconfigure ca-certificates), I had to:

  • Use url = https://buildkitsandbox/xml-rpc in my ~/.tcms.conf or a I would get an SSL error with hostname mismatch (I just hacked /etc/hosts to set buildkitsandbox to 127.0.0.1)
  • Set the env var SSL_CERT_FILE = /etc/ssl/certs/ca-certificates.crt or the SSL context deep inside the connection calls would not find any certs (context.get_ca_certs() returned an empty list)

Python requests uses the REQUESTS_CA_BUNDLE env variable which worked so I knew I had the correct cert but had a lot of trouble figuring this out. Adding something to the docs about this would be very helpful for others that are struggling with certificate verification.

Of course, I'm new to all this so if I missed something or there is an easier/cleaner way to do this, I'd love to know what that is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions