Sometimes, you have to generate the keys for your projects. You can use the coomand below:
1 2 3 |
openssl req \ -newkey rsa:2048 -nodes -keyout domain.key \ -x509 -days 365 -out domain.crt |
Create a Private CA
1 |
openssl genrsa -out ca-priv-key.pem 2048 |
Public CA
1 |
openssl req -config /usr/lib/ssl/openssl.cnf -new -key ca-priv-key.pem -x509 -days 1825 -out ca.pem |
Sign Keys
1 |
openssl genrsa -out swarm-priv-key.pem 2048 |
CSR
1 |
openssl req -subj "/CN=swarm" -new -key swarm-priv-key.pem -out swarm.csr |
Certs
1 |
openssl x509 -req -days 1825 -in swarm.csr -CA ca.pem -CAkey ca-priv-key.pem -CAcreateserial -out swarm-cert.pem -extensions v3_req -extfile /usr/lib/ssl/openssl.cnf |