MCPcopy
hub / github.com/pyca/cryptography / test_generate

Method test_generate

tests/x509/test_x509_ext.py:5965–5975  ·  view source on GitHub ↗
(self, rsa_key_2048: rsa.RSAPrivateKey, backend)

Source from the content-addressed store, hash-verified

5963 assert isinstance(poison, x509.PrecertPoison)
5964
5965 def test_generate(self, rsa_key_2048: rsa.RSAPrivateKey, backend):
5966 private_key = rsa_key_2048
5967 cert = (
5968 _make_certbuilder(private_key)
5969 .add_extension(x509.PrecertPoison(), critical=True)
5970 .sign(private_key, hashes.SHA256(), backend)
5971 )
5972 poison = cert.extensions.get_extension_for_oid(
5973 ExtensionOID.PRECERT_POISON
5974 ).value
5975 assert isinstance(poison, x509.PrecertPoison)
5976
5977 def test_eq(self):
5978 pcp1 = x509.PrecertPoison()

Callers

nothing calls this directly

Calls 4

_make_certbuilderFunction · 0.85
get_extension_for_oidMethod · 0.80
signMethod · 0.45
add_extensionMethod · 0.45

Tested by

no test coverage detected