OpenSSL

Create certificate


generate self-signed certificate
openssl req -new -x509 -out cert.pem -keyout key.pem
create private key
openssl genrsa -out key.pem 2048
create private key with password protected
openssl genrsa -des3 -out key.pem 2048
generate self-signed certificate by key.pem
openssl req -new -x509 -key key.pem -out cert.pem -days 3650
create certificate request
openssl req -new -key key.pem -out cert.csr

View certificate


view PEM certficate
openssl x509 -in cert.pem -inform pem -noout -text
view DER certficate
openssl x509 -in cert.der -inform der -noout -text