get_ca_certs() includes current directory

Bug #1072793 reported by Andreas Hasenack on 2012-10-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAWS
Undecided
Andreas Hasenack

Bug Description

get_ca_certs() from txaws/client/ssl.py is including the current directory, whatever it is, when searching and loading CA certificates.

It happens because DEFAULT_CERTS_PATH ends with ":", so cert_paths ends up being a list with an empty element. When that element's turn comes up in the for loop, we end up looking for "*.pem" in the local directory.

    cert_paths = os.getenv("TXAWS_CERTS_PATH", DEFAULT_CERTS_PATH).split(":")
    certificate_authority_map = {}
    for path in cert_paths:
        for cert_file_name in glob(os.path.join(path, "*.pem")):

Related branches

Changed in txaws:
status: New → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in txaws:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers