![]() ![]() If you want to generate a new key pair, then use genrsa. Under bin, type the command openssl genrsa -out server.key 4096 (. ![]() If you want just the public key, you can run: openssl x509 -pubkey -noout -in crtfile. PS: this command prints the whole certificate. Something like: openssl x509 -text -in crtfile (or omit 'openssl' if you're inside OpenSSL> prompt). If you want just the public key, you can run: openssl x509 -pubkey -noout -in crtfile In cmd, go to the path where you installed OpenSSL. If you want to get the public key that's inside the certificate, you must read it using openssl x509 command. Something like: openssl x509 -text -in crtfile` (or omit "openssl" if you're inside `OpenSSL>` prompt). For more information on using the following commands, see the OpenSSL documentation. If you want to get the public key that's inside the certificate, you must read it using openssl x509 command. Create a Certificate Authority (CA) private key and public certificate. openssl.exe genrsa -out .key 4096 openssl.exe req -new -key yourcertname.key -out yourcertname.csr.There's no way to generate a new key from it (because it already has a key). openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365. My point is: if you have a CRT file (aka certificate), it means a key pair was already generated and signed by a Certification Authority. The public key will be signed by a Certification Authority, and the result is a digital certificate (which can be in a CRT file) In short, it generates 2 keys: one private and one public. In this case, you should just type genrsa etc.Ä«ut I don't know if I get what you're trying to do (generate a key from a crt file), mainly because: genrsa is a command to generate a new key pair using RSA algorithm. It means you're inside openssl command and you don't need to type "openssl" again (that's why you've got the message "openssl is an invalid command"). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |