#tls-certificates #certificate #testing #tls #tls-server #generate #server-client

bin+lib test-cert-gen-2

Utility to generate certificates for tests (e. g. for TLS)

2 unstable releases

0.12.0 Nov 25, 2024
0.11.0 May 7, 2024

#1396 in Cryptography

Download history 787/week @ 2024-08-26 747/week @ 2024-09-02 459/week @ 2024-09-09 429/week @ 2024-09-16 742/week @ 2024-09-23 1055/week @ 2024-09-30 924/week @ 2024-10-07 772/week @ 2024-10-14 829/week @ 2024-10-21 699/week @ 2024-10-28 1140/week @ 2024-11-04 1268/week @ 2024-11-11 875/week @ 2024-11-18 507/week @ 2024-11-25 120/week @ 2024-12-02 179/week @ 2024-12-09

1,764 downloads per month
Used in 17 crates (9 directly)

MIT/Apache

19KB
463 lines

test-cert-gen

Utility to generate certificates for tests.

test_cert_gen::gen_keys()

returns:

  • server certificate and private key pair in DER or PKCS12 format
  • CA DER file to be used on the client

This is typically enough to configure a TLS server and client for unit/integration tests.

Certificates are generated with openssl command.

Generated certificates expire in a day.


lib.rs:

Utilities to generate keys for tests.

Uses OpenSSL command line utility to generate the certificates.

Dependencies

~1.9–9.5MB
~114K SLoC