Created
December 24, 2019 02:00
-
-
Save usmansaleem/cf2ba3a7dba9bdda1343c328710370ee to your computer and use it in GitHub Desktop.
Self Signed PFX key store using keytool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keytool -genkeypair -keystore rpc_keystore.pfx -storetype PKCS12 -storepass changeit -alias testrpcserver -keyalg RSA -keysize 2048 -validity 109500 -dname "CN=localhost, OU=PegaSys, O=ConsenSys, L=Brisbane, ST=QLD, C=AU" -ext san=dns:localhost,ip:127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using OpenSSL to export PKCS12 to cert and private key:
openssl pkcs12 -in path.pfx -out newfile.crt.pem -clcerts -nokeys
openssl pkcs12 -in path.pfx -out newfile.key.pem -nocerts -nodes