Commit graph

10 commits

Author SHA1 Message Date
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
irl
5275a2a882 test: simplify list obfuscator tests 2024-12-20 14:08:18 +00:00
irl
e5976c4739 feat: expand onion service api 2024-12-06 13:34:44 +00:00
8115966aca feat(proxy): rewrite the meta module to support hot spares 2023-05-30 16:38:00 +01:00
15a85b1efe feat(static): adds new static origins feature 2023-05-25 15:32:31 +01:00
0f537c888d test(block): remove old test case for external
we use json now
2023-05-03 15:49:47 +01:00
d5b9db24ff test(block): adds test for block_external parsing 2023-03-30 15:55:33 +01:00
36cc1dc7ab tests: switch from nose to pytest 2023-03-30 14:11:09 +01:00
e57f406967 ci: let nose discover the tests 2022-05-17 08:13:27 +01:00
7e8e9e1033 tests/lists: adds some tests for the obfuscator 2022-05-16 17:35:55 +01:00