Skip to content

Instantly share code, notes, and snippets.

@tonsV2
Created August 21, 2010 23:16
Show Gist options
  • Save tonsV2/543011 to your computer and use it in GitHub Desktop.
Save tonsV2/543011 to your computer and use it in GitHub Desktop.
Script used to create a self signed cert
#! /bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 domain_name"
exit
fi
openssl req -new -newkey rsa:2048 -nodes -out $1.csr -keyout $1.key -subj "/C=DK/ST=Copenhagen/L=Noerrebro/O=my_company/CN=$1"
openssl x509 -req -days 365 -in $1.csr -signkey $1.key -out $1.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment