The following command generates a file which contains both public and private key:
openssl genrsa -des3 -out privkey.pem 2048
Source: here
With OpenSSL, the private key contains the public key information as well, so a public key doesn't need to be generated separately
How can we extract the public key from the privkey.pem file?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…