Skip to content

Instantly share code, notes, and snippets.

@linuxoid69
Created April 23, 2017 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxoid69/c0b9c66ee369abe91a7a1cdc22c71a6f to your computer and use it in GitHub Desktop.
Save linuxoid69/c0b9c66ee369abe91a7a1cdc22c71a6f to your computer and use it in GitHub Desktop.
ssl self-sign
# create CA key and cert
openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -key rootCA.key -days 10000 -out rootCA.crt
# create host key, csr and sing host cert CA
openssl genrsa -out server101.mycloud.key 2048
openssl req -new -key server101.mycloud.key -out server101.mycloud.csr
openssl x509 -req -in server101.mycloud.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out server101.mycloud.crt -days 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment