~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/client/ssl.py

Merged 921421-completemultipart [r=oubiwann][f=921421]

This branch adds Complete Multipart method to s3 client.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
# Multiple defaults are supported; just add more paths, separated by colons.
18
18
if sys.platform == "darwin":
19
 
    DEFAULT_CERTS_PATH = "/System/Library/OpenSSL/certs/"
 
19
    DEFAULT_CERTS_PATH = "/System/Library/OpenSSL/certs/:"
20
20
# XXX Windows users can file a bug to add theirs, since we don't know what
21
21
# the right path is
22
22
else:
23
 
    DEFAULT_CERTS_PATH = "/etc/ssl/certs/"
 
23
    DEFAULT_CERTS_PATH = "/etc/ssl/certs/:"
24
24
 
25
25
 
26
26
class VerifyingContextFactory(CertificateOptions):
99
99
    cert_paths = os.getenv("TXAWS_CERTS_PATH", DEFAULT_CERTS_PATH).split(":")
100
100
    certificate_authority_map = {}
101
101
    for path in cert_paths:
102
 
        if not path:
103
 
            continue
104
102
        for cert_file_name in glob(os.path.join(path, "*.pem")):
105
103
            # There might be some dead symlinks in there, so let's make sure
106
104
            # it's real.