Created
May 24, 2013 20:58
-
-
Save BlackMaria/5646471 to your computer and use it in GitHub Desktop.
This is what I eventually used to generate ssl keys for lumberjack. I had made several attempts that failed and with the help of tomar ( how pointed me to a page for apache certs... ) this is what I did and it worked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SERVER=logstash | |
################################################ | |
if [ ! -f "${SERVER}.crt" -o ! -f "${SERVER}.key" ] ; then | |
rm -f ${SERVER}.{crt,key,csr} | |
openssl genrsa -des3 -out ${SERVER}.key 1024 | |
openssl req -new -key ${SERVER}.key -out ${SERVER}.csr | |
cp ${SERVER}.key ${SERVER}.key.org | |
openssl rsa -in ${SERVER}.key.org -out ${SERVER}.key | |
openssl x509 -req -days 365 -in ${SERVER}.csr -signkey ${SERVER}.key -out ${SERVER}.crt | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment