Skip to content

openssl

Create Selfsigned Cert

Bash
openssl req -x509 -new -newkey rsa:4096 -nodes -subj "/C=EU/ST=Czech/O=Dis" -keyout namehere.key -out namehere.crt -sha256 -days 730
cat namehere.key namehere.crt > namehere.pem
With common name - CN

Bash
openssl req -x509 -new -newkey rsa:4096 -nodes -subj "/C=EU/ST=Serbia/O=Dis" -subj "/CN=example.com" -keyout example.com.key -out example.com.crt -sha256 -days 730

Bundle key and crt

Bash
cat example.com.key example.com.crt > example.com.pem

Use tls/gen

Bash
git clone https://github.com/rabbitmq/tls-gen tls-gen
cd tls-gen/basic
# private key password
make PASSWORD=bunnies
make verify
make info
ls -l ./result

Check TLS cert

Bash
openssl x509 -noout -dates -text -in certname.pem