Merge lp:~ahasenack/txaws/no-local-dir-for-ca-lookup into lp:txaws
Proposed by
Andreas Hasenack
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Christopher Armstrong | ||||
Approved revision: | 158 | ||||
Merged at revision: | 151 | ||||
Proposed branch: | lp:~ahasenack/txaws/no-local-dir-for-ca-lookup | ||||
Merge into: | lp:txaws | ||||
Diff against target: | 0 lines | ||||
To merge this branch: | bzr merge lp:~ahasenack/txaws/no-local-dir-for-ca-lookup | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christopher Armstrong | Approve | ||
Jamu Kakar | Approve | ||
Review via email: mp+131949@code.launchpad.net |
Description of the change
This branch changes get_ca_certs() so that it does not accidentally include the current directory when looking for *.pem CA files to load.
To post a comment you must log in.
[1]
The test is tainting the TXAWS_CERTS_PATH environment variable. You
could do something like the following. Also, I recommend you add a
simple sentence clearly describing the expected behaviour.
def test_get_ ca_certs_ no_current_ dir(self) : Error} exception is raised if no certificate paths are certs_path = os.environ. get("TXAWS_ CERTS_PATH" )
os.environ[ "TXAWS_ CERTS_PATH" ] = "%s:" % self.no_certs_dir
os.chdir( self.one_ cert_dir)
self.assertRai ses(exception. CertsNotFoundEr ror, ssl.get_ca_certs) certs_path:
os. environ[ "TXAWS_ CERTS_PATH" ] = original_certs_path "TXAWS_ CERTS_PATH" ]
"""
A L{CertsNotFound
available.
"""
original_
try:
finally:
if original_
else:
del os.environ[
Nice work, +1! :)