OpenSSL

Generate self-signed certificate and key in one line

1
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt

View certificate

1
openssl x509 -in foo.pem -noout -text