Skip to content

Instantly share code, notes, and snippets.

@JurrianFahner
Created June 25, 2015 19:15
Show Gist options
  • Save JurrianFahner/e4698924066ac933e761 to your computer and use it in GitHub Desktop.
Save JurrianFahner/e4698924066ac933e761 to your computer and use it in GitHub Desktop.
A simple script to create an csr for a SSL certificate request. Only thing a user must do is to adapt the dommainname and answer the questions asked.
#!/bin/bash
domainname="www.dommainname.com"
namekeyfile="$domainname.key"
namecsrfile="$domainname.csr"
# first create a private key
openssl genrsa -out $namekeyfile 2048
# second create the certificate request
openssl req -new -sha256 -key $namekeyfile -out $namecsrfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment