Pragmatically Generating a Self-Signed Certificate and Private Key using OpenSSL
The tutorial explains how to generate RSA or ECDSA private keys and a self-signed X509 server certificate with OpenSSL, then save and verify the files, while stressing key protection.