This is what I do.

Bojan

On Mon, 2002-10-28 at 11:13, Vernon Webb wrote:
> Can someone tell me where I can find a good how-to or can someone please 
> explain how to setup and create ssl certs and keys for an Apache driven web 
> site? 
> 
> I've used the following to create the crt:
>      openssl genra -out privkey.pem
>      openssl req -new -key privkey.pem -out cert.crt
> 
> But what else do I need? Don't I need a key? I've noticed in the default 
> httpd.conf that the follwoing is used:
> 
> SSLEngine on
> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
> 
> So how do I create the key? I tried using the server's key, but when I look 
> at it is says localhost.localdomain
> 
> Thanks
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by Webb Solutions' MailScanner,
> and is believed to be clean.
> 

#!/bin/sh

if [ $# -lt 1 ]; then
  echo "$0: usage: $(basename $0) name"
  exit 1
fi

NAME="$1"

openssl req -new > $NAME.csr
openssl rsa < privkey.pem > $NAME.key
openssl x509 -in $NAME.csr -out $NAME.crt -req -signkey $NAME.key -days 365

Reply via email to