#!/bin/sh if [ "$1" = "" ]; then echo "pass your private key [../ssl.key/foo.key] as the first arg" exit fi if [ "$2" = "" ]; then echo "pass where you want your PEM encoded certificate request [../ssl.csr/foo.csr] as second arg" exit fi echo /usr/local/ssl/bin/openssl req \ -config createcsr.cnf \ -new \ -key $1 \ -out $2 /usr/local/ssl/bin/openssl req \ -config createcsr.cnf \ -new \ -key $1 \ -out $2 chmod 0400 $2