Skip to content

Instantly share code, notes, and snippets.

View tropical32's full-sized avatar

Kamil tropical32

View GitHub Profile
@tropical32
tropical32 / rustls-localhost.md
Last active February 17, 2024 22:31
Generate a root CA and end-entity client certificate for use with Rustls in the localhost environment.

Generate an EC private key for the root certificate:

openssl-1.1 ecparam -name prime256v1 -genkey -noout -out root.key

Create a root certificate signing request:

openssl-1.1 req -new -key root.key -out root.csr -subj "/CN=Root CA"

Create a self-signed root certificate: