This file contains 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
!openssl x509 -noout -text \ | |
-in /root/ca/user/user_server.cert.pem |
This file contains 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
!openssl ca -config /content/inter_ca_config.ini -passin pass:password\ | |
-extensions server_cert -days 375 -notext -md sha256 \ | |
-in /root/ca/user/user.csr \ | |
-out /root/ca/user/user_server.cert.pem -batch | |
!chmod 444 /root/ca/user/user_server.cert.pem |
This file contains 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
!openssl req -config /content/inter_ca_config.ini -passin pass:user1234\ | |
-key /root/ca/user/user.key.pem\ | |
-new -sha256 -out /root/ca/user/user.csr |
This file contains 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
!mkdir /root/ca/user | |
!openssl genrsa -aes256 -passout pass:user1234 \ | |
-out /root/ca/user/user.key.pem 4096 | |
!chmod 400 /root/ca/user/user.key.pem |
This file contains 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
!cat /root/ca/intermediate/certs/inter.cert.pem \ | |
/root/ca/certs/ca.cert.pem > /root/ca/intermediate/certs/ca-chain.cert.pem | |
!chmod 444 /root/ca/intermediate/certs/ca-chain.cert.pem |
This file contains 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
# OpenSSL intermediate CA configuration file. | |
# Copy to `/root/ca/intermediate/inter_ca_config.ini`. | |
[ ca ] | |
# `man ca` | |
default_ca = CA_default | |
[ CA_default ] | |
# Directory and file locations. | |
dir = /root/ca/intermediate |
This file contains 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
!chmod 444 /root/ca/intermediate/certs/inter.cert.pem | |
!openssl x509 -noout -text \ | |
-in /root/ca/intermediate/certs/inter.cert.pem | grep CA: | |
!openssl verify -CAfile /root/ca/certs/ca.cert.pem \ | |
/root/ca/intermediate/certs/inter.cert.pem |
This file contains 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
!cd /root/ca;\ | |
openssl ca -config /content/root_ca_config.ini -passin pass:foobar\ | |
-extensions v3_intermediate_ca \ | |
-days 3650 -notext -md sha256 \ | |
-in intermediate/csr/inter.csr \ | |
-out intermediate/certs/inter.cert.pem -batch |
This file contains 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
!cd /root/ca;\ | |
openssl req -config /content/inter_ca_config.ini -new -sha256 \ | |
-key intermediate/private/inter.key.pem -passin pass:password \ | |
-out intermediate/csr/inter.csr |
This file contains 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
!cd /root/ca;\ | |
openssl genrsa -aes256 \ | |
-passout pass:password \ | |
-out intermediate/private/inter.key.pem 4096 | |
!chmod 400 /root/ca/intermediate/private/inter.key.pem |