Skip to content

openssl

Create Selfsigned Cert

Bash
openssl req -x509 -new -newkey rsa:4096 -nodes -subj "/C=EU/ST=Czech/O=Dis" -keyout $HOME/ssl/namehere.key -out $HOME/ssl/namehere.crt -sha256 -days 730
cat $HOME/ssl/namehere.key $HOME/ssl/namehere.crt > $HOME/ssl/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 $HOME/ssl/mydata-dev.key -out $HOME/ssl/mydata-dev.crt -sha256 -days 730

Bundle key and crt

Bash
cat $HOME/ssl/mydata-dev.key $HOME/ssl/mydata-dev.crt > $HOME/ssl/mydata-dev.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