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

bin+lib test-cert-gen-2

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

1 unstable release

0.11.0 May 7, 2024

#1889 in Cryptography

Download history 135/week @ 2024-07-21 72/week @ 2024-07-28 89/week @ 2024-08-04 190/week @ 2024-08-11 114/week @ 2024-08-18 680/week @ 2024-08-25 792/week @ 2024-09-01 472/week @ 2024-09-08 437/week @ 2024-09-15 712/week @ 2024-09-22 1050/week @ 2024-09-29 913/week @ 2024-10-06 791/week @ 2024-10-13 822/week @ 2024-10-20 728/week @ 2024-10-27 1074/week @ 2024-11-03

3,600 downloads per month
Used in 13 crates (5 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–10MB
~116K SLoC