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

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

#1709 in Cryptography

Download history 164/week @ 2024-06-17 91/week @ 2024-06-24 102/week @ 2024-07-01 118/week @ 2024-07-08 178/week @ 2024-07-15 117/week @ 2024-07-22 73/week @ 2024-07-29 107/week @ 2024-08-05 182/week @ 2024-08-12 115/week @ 2024-08-19 787/week @ 2024-08-26 747/week @ 2024-09-02 459/week @ 2024-09-09 429/week @ 2024-09-16 748/week @ 2024-09-23 997/week @ 2024-09-30

2,713 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

~2–10MB
~118K SLoC