Hodžův blog

09 Čvn

Generování Self-Signed Certifikátu skriptem

Už mě to nebaví pořád psát, takže:

#!/bin/bash
SERVER_NAME=$1
OPENSSL_PATH=/usr/bin/openssl
$OPENSSL_PATH genrsa -des3 -out $SERVER_NAME.key 1024
$OPENSSL_PATH genrsa -out $SERVER_NAME.key 1024
$OPENSSL_PATH rsa -in $SERVER_NAME.key -out $SERVER_NAME.pem
$OPENSSL_PATH req -new -key $SERVER_NAME.pem -out $SERVER_NAME.csr
$OPENSSL_PATH x509 -req -days 365 -in $SERVER_NAME.csr -signkey $SERVER_NAME.pem -out $SERVER_NAME.crt

Leave a Reply

Hodžův blog is is proudly powered by Wordpress and the Magellan Theme