Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with generating SSL Certificates #119

Open
dijeesh opened this issue Jan 21, 2019 · 1 comment
Open

Help with generating SSL Certificates #119

dijeesh opened this issue Jan 21, 2019 · 1 comment

Comments

@dijeesh
Copy link

dijeesh commented Jan 21, 2019

Any proper steps for generating ca.pem, route-key.pem, route.pem, server-key.pem, and server.pem files

@Ryner51
Copy link

Ryner51 commented Feb 11, 2019

These are the commands I used for the ca.pem, server-key.pem and server-cert.pem (server.pem):

#Create Server Certificates
export HOST=hostname
openssl genrsa -aes256 -out ca-key.pem 4096
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem
openssl genrsa -out server-key.pem 4096
openssl req -subj "/CN=$HOST" -sha256 -new -key server-key.pem -out server.csr
echo subjectAltName = DNS:$HOST,IP:10.10.10.20,IP:127.0.0.1 >> extfile.cnf
echo extendedKeyUsage = serverAuth >> extfile.cnf
openssl x509 -req -days 365 -sha256 -in server.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -extfile extfile.cnf

#Create Client Certificates
openssl genrsa -out key.pem 4096
openssl req -subj '/CN=client' -new -key key.pem -out client.csr
echo extendedKeyUsage = clientAuth > extfile-client.cnf
openssl x509 -req -days 365 -sha256 -in client.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out cert.pem -extfile extfile-client.cnf

rm -v client.csr extfile.cnf extfile-client.cnf
rm -v client.csr server.csr extfile.cnf extfile-client.cnf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants