August 11, 2004

OpenSSL Certs

I pulled out some parts of others' scripts to make self-signed SSL Certs for apache in OpenBSD.

#!/bin/sh
svrname="test.server"
destdir="/var/www/conf/$svrname"
prv="private"
dname="server"

sk="$destdir/$prv/$dname.key"
csr="$destdir/$prv/$dname.csr"
crt="$destdir/$dname.crt"


echo $sk
echo $csr
echo $crt

exit

/usr/sbin/openssl genrsa -out $sk 1024
/usr/sbin/openssl req -new -key $sk -out $csr
/usr/sbin/openssl x509 -req -days 365 -in $csr \
        -signkey $sk -out $crt
Posted by benjamin at August 11, 2004 12:07 PM