handle exceptions when loading CRLs

This commit is contained in:
dandds
2019-01-17 14:20:04 -05:00
parent 9f71b8313c
commit 0457b0a508
2 changed files with 41 additions and 23 deletions

View File

@@ -46,6 +46,16 @@ def test_can_build_trusted_root_list():
assert len(cache.certificate_authorities.keys()) == content.count("BEGIN CERT")
def test_can_build_crl_list_with_missing_crls():
location = "ssl/client-certs/client-ca.der.crl"
cache = CRLCache(
"ssl/client-certs/client-ca.crt",
crl_locations=["tests/fixtures/sample.pdf"],
store_class=MockX509Store,
)
assert len(cache.crl_cache.keys()) == 0
def test_can_validate_certificate():
cache = CRLCache(
"ssl/server-certs/ca-chain.pem",