Created
August 29, 2019 09:39
-
-
Save robincher/1ec831399160a2a5b3b01c5ce49c597e to your computer and use it in GitHub Desktop.
Self-Signed CA and Client Certificate
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/bash | |
#Generate Self-signed CA | |
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ca.key -out ca.crt | |
#Make a directory | |
mkdir client | |
#Generate Corresponding client certificate | |
openssl genrsa -out client/helios.key 2048 | |
openssl req -new -key client/helios.key -out client/helios.csr | |
openssl x509 -req -days 365 -sha256 -in client/helios.csr -CA ca.crt -CAkey ca.key -set_serial 2 -out client/helios.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment