mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Add benchmark for loading DER certificates (#8597)
This commit is contained in:
parent
3df3fc8987
commit
e565402f2f
1 changed files with 10 additions and 0 deletions
|
|
@ -22,6 +22,16 @@ def test_aki_public_bytes(benchmark):
|
|||
benchmark(aki.public_bytes)
|
||||
|
||||
|
||||
def test_load_der_certificate(benchmark):
|
||||
cert_bytes = load_vectors_from_file(
|
||||
os.path.join("x509", "PKITS_data", "certs", "GoodCACert.crt"),
|
||||
loader=lambda pemfile: pemfile.read(),
|
||||
mode="rb",
|
||||
)
|
||||
|
||||
benchmark(x509.load_der_x509_certificate, cert_bytes)
|
||||
|
||||
|
||||
def test_load_pem_certificate(benchmark):
|
||||
cert_bytes = load_vectors_from_file(
|
||||
os.path.join("x509", "cryptography.io.pem"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue