Raise Error Code 008 for invalid CRLs

This commit is contained in:
Montana
2019-03-12 16:42:58 -04:00
parent d6906c8504
commit effec85cf9
5 changed files with 29 additions and 10 deletions

View File

@@ -56,12 +56,9 @@ def test_expired_crl_check_fails():
auth_context = AuthenticationContext(
MockCRLCache(valid=False, expired=True), "SUCCESS", DOD_SDN, CERT
)
with pytest.raises(UnauthenticatedError) as excinfo:
with pytest.raises(CRLInvalidException) as excinfo:
assert auth_context.authenticate()
(message,) = excinfo.value.args
assert "CRL expired" in message
def test_bad_sdn():
auth_context = AuthenticationContext(MockCRLCache(), "SUCCESS", "abc123", CERT)