Skip to content

Instantly share code, notes, and snippets.

@luccastera
Created July 28, 2009 19:46
Show Gist options
  • Save luccastera/157629 to your computer and use it in GitHub Desktop.
Save luccastera/157629 to your computer and use it in GitHub Desktop.
Used to create a self-signed certificate
#!/bin/sh
NAME=$1
if [ "$NAME" == '' ]
then
echo "$0 <certificate name>" 1>&2
exit 1
fi
openssl genrsa 1024 | openssl pkcs8 -topk8 -nocrypt -out $NAME.key
openssl req -new -x509 -nodes -sha1 -days 365 -key $NAME.key -out $NAME.cert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment