Snake Oil SSL Certificate Bash Script

TwitterDeliciousStumbleUponBlogger PostTechnorati FavoritesDiggLinkatopiaPingShare
#!/usr/bin/env bash
if [ "$#" -lt 1 ]; then
    echo "usage: snakeoil.sh certname";
    exit;
fi
 
server=$1
 
openssl genrsa -des3 -out $server.key 1024
openssl rsa -in $server.key -out $server.key.insecure
mv $server.key $server.key.secure
mv $server.key.insecure $server.key
openssl req -new -key $server.key -out $server.csr
openssl x509 -req -days 365 -in $server.csr -signkey $server.key -out $server.crt
TwitterDeliciousStumbleUponBlogger PostTechnorati FavoritesDiggLinkatopiaPingShare
This entry was posted in Notes and Quick Fixes and tagged , . Bookmark the permalink.

Comments are closed.

Rock Solid Web Design is a full service web development firm specializing in custom database driven applications in PHP.