majuna/app
Ana Custura d5fa521fa1 feat: break up validate_tls_keys and add unit tests
I've split the existing code in several new functions:
 - load_certificates_from_pem (takes pem data as bytes)
 - build_certificate_chain (takes a list of Certificates)
 - validate_certificate_chain (takes a list of Certificates)
 - validate_key (takes pem data as a string)
 - validate_key_matches_cert (now takes a pem key string and a Certificate)
 - extract_sans (now takes a Certificate)
 - validate_end_entity_expired (now takes a Certificate)
 - validate_end_entity_not_yet_valid (now takes a Certificate)

When a relevant exception arises, these functions raise a type of TLSValidationError,
these are appended to the list of errors when validating a cert.
2024-12-20 14:25:58 +00:00
..
api lint: reformat python code with black 2024-12-06 18:15:47 +00:00
brm lint: reformat python code with black 2024-12-06 18:15:47 +00:00
cli lint: reformat python code with black 2024-12-06 18:15:47 +00:00
lists lint: reformat python code with black 2024-12-06 18:15:47 +00:00
models lint: reformat python code with black 2024-12-06 18:15:47 +00:00
portal lint: reformat python code with black 2024-12-06 18:15:47 +00:00
static Initial import 2022-04-08 12:59:00 +01:00
terraform lint: reformat python code with black 2024-12-06 18:15:47 +00:00
util feat: break up validate_tls_keys and add unit tests 2024-12-20 14:25:58 +00:00
__init__.py lint: reformat python code with black 2024-12-06 18:15:47 +00:00
alarms.py lint: reformat python code with black 2024-12-06 18:15:47 +00:00
extensions.py lint: reformat python code with black 2024-12-06 18:15:47 +00:00
tfstate.py lint: reformat python code with black 2024-12-06 18:15:47 +00:00