ZhoubaWiki:HowToCreateSelfSignedCert

From ZhoubaWiki
Jump to navigation Jump to search

Self signed HTTPS certificate creation process

Create private key

openssl genrsa -des3 -out $domain.key

Create private key w/out passphrase

openssl rsa -in $domain.key -out $domain.key.unsecure

Create CA request

openssl req -new -key $domain.key -out $domain.key.csr

Create the self-signed certificate itself

openssl x509 -req -days 90 -in $domain.key.csr -signkey $domain.key -out $domain.cert

Set correct access rights

chmod 400 $domain.cert
chmod 400 $domain.key
chmod 400 $domain.key.unsecure