- Run KeyTool IUI by running <root after unpacking>\ktl241sta\run_ktl.bat
- Create a new PKCS12 keystore
- Click View, Select task, Create, Keystore
- Select PKCS12 as the format
- Select a target
- Specify a password (optional)
- Click OK
- Import the key from the JKS keystore into the new on that you just created
- Click View, Select task, Import, Keystore's entry, Private key, From other keystore
- Select the JKS keystore
- Specify its password (optional) . JKS keystore's have a default password of "changeit" (from what I gather)
- Select the PKCS12 format for the target keystore
- Specify the target keystore file
- Enter a password for the target keystore (optional)
- Click OK
- Select the alias(es) of the key(s) you want to import into the empty PKCS12 keystore from the JKS keystore
- Enter the password for the key ("changeit" by default)
- Wave to your little Java friend up there in the corner
- Click OK
- Enter in the new private key's alias (to become part of the CN?)
- Enter and confirm a password for the key (optional)
- Wave again
- Click OK
- Import the key in the new PKCS12 keystore into the Windows Certificate Store
- Start the MMC and add the cert snap-in for the local computer account
- Expand the "Certificates (Local Computer)" node
- Right-click the Personal node, select All tasks, and choose Import
- Click Next (missing your little Java friend?)
- Click Browse
- Change the file filter to "Personal Information Exchange (*.pfx;*.p12)
- Select the PKCS12 keystore you created in step 3 and click Open
- Click Next
- Enter the password for the keystore if you created; otherwise leave it blank
- Mark the private key as exportable if you want to get it out of the Windows Cert Store at a later time
- Click Next (Java Dude, where are you?!)
- Use the default Cert store (Personal) and click Next
- Click Finish!
Your cert will be in the Certificates subdirectory; it's thumbprint should match the output of keytool:
Thanks Duke!!!
Exporting Keys from a JKS and into the Windows Cert Store
No TrackBacks
TrackBack URL: http://travisspencer.com/blog-mt/mt-tb.cgi/86
Great post on a very useful matter.