This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import ssl
|
||||
from pathlib import Path
|
||||
|
||||
import certifi
|
||||
|
||||
from apps.sources.services.tls import trusted_tls_context
|
||||
|
||||
|
||||
def test_application_tls_context_uses_strict_pinned_ca_bundle():
|
||||
context = trusted_tls_context()
|
||||
|
||||
assert Path(certifi.where()).is_file()
|
||||
assert context.verify_mode == ssl.CERT_REQUIRED
|
||||
assert context.check_hostname is True
|
||||
assert context.cert_store_stats()["x509_ca"] > 0
|
||||
Reference in New Issue
Block a user