Development/Common

Using the OpenSSL toolkit

linuxism 2017. 9. 17. 21:17

* Create and verify a private key

$ openssl genrsa -aes256 -out private_key.pem 2048

$ openssl rsa -noout -text - in private_key.pem


* Create a CSR

$ openssl req -new -key private_key.pem -out test.csr


* Create and verify a self-signed certificate

$ openssl x509 -in test.csr -out test.crt -req -signkey private_key.pem -days 3560

$ openssl x509 -noout -text -in test.crt