Skip to content

Instantly share code, notes, and snippets.

@Ranlvor
Created December 29, 2014 15:25
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 Ranlvor/013c481d124c54cfe613 to your computer and use it in GitHub Desktop.
Save Ranlvor/013c481d124c54cfe613 to your computer and use it in GitHub Desktop.
A short snipped I use for generating my keys. It just creates a new RSA-Key including Certificate Request, ready to copypaste to startssl and then waits for you to copy the certificate startssl generated back. Then it creates a file of private key and certificate ready to be used for example by apache.
echo -e "\e[1;32manswer all the following questions by just typing [Enter], startssl will ignore them anyway\e[0m"
echo
openssl req -nodes -new -newkey rsa:4096 -out csr.pem
echo
echo -e "\e[1;32mcopypaste the Request to startssl to generate the certificate\e[0m"
echo
cat csr.pem
echo
echo -e "\e[1;32mpaste the certificate here, end with [STRG+D]\e[0m"
echo
cat > cert.pem
cat cert.pem privkey.pem > combined.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment