Aşağıdaki script ile kolay bir şekilde oluşturabiliriz.
remzi@han:/tmp/sslcert$ cat ~/bin/create-self-cert.sh
#!/bin/bash
set +x
if [ $# -eq "1" ]
then
certname=$1
else
certname=`hostname -f`
fi
# openssl genrsa -des3 -out $certname.key 2048
openssl genrsa -out $certname.key 2048
openssl req -new -key $certname.key -out $certname.csr
openssl x509 -req -days 3650 -in $certname.csr -signkey $certname.key -out $certname.cert
remzi@han:/tmp/sslcert$ cat ~/bin/create-self-cert.sh
#!/bin/bash
set +x
if [ $# -eq "1" ]
then
certname=$1
else
certname=`hostname -f`
fi
# openssl genrsa -des3 -out $certname.key 2048
openssl genrsa -out $certname.key 2048
openssl req -new -key $certname.key -out $certname.csr
openssl x509 -req -days 3650 -in $certname.csr -signkey $certname.key -out $certname.cert
Kullanımı:
remzi@han:/tmp/sslcert$ ./create-self-cert.sh localhost
Yorumlar
Yorum Gönder