#gen #test #tls #der #testing #certificate #client #utility #e #cert

bin+lib test-cert-gen

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

6 releases (breaking)

0.9.0 Apr 28, 2022
0.8.0 Apr 28, 2022
0.7.0 Oct 26, 2021
0.6.0 Oct 24, 2021
0.1.0 Jun 29, 2020

#313 in Testing

Download history 1537/week @ 2022-12-06 1609/week @ 2022-12-13 1866/week @ 2022-12-20 1741/week @ 2022-12-27 2096/week @ 2023-01-03 2061/week @ 2023-01-10 1985/week @ 2023-01-17 5167/week @ 2023-01-24 3663/week @ 2023-01-31 2081/week @ 2023-02-07 2067/week @ 2023-02-14 1933/week @ 2023-02-21 1554/week @ 2023-02-28 1961/week @ 2023-03-07 1256/week @ 2023-03-14 1469/week @ 2023-03-21

6,635 downloads per month
Used in 18 crates (7 directly)

MIT/Apache

19KB
469 lines

GitHub Workflow Status License crates.io

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.2–6MB
~118K SLoC