Copyright © 2004, 2005 TJ
The GNU General Public License version 2 or later applies to my ExportPrvKey.class. See http://www.gnu.org/licenses/gpl.html
Here's how to get and use a code-signing Thawte digital certificate to sign your Java JAR and Microsoft CAB, EXE, DLL, VBscript, etc. code, to create trusted applets for downloading over the Internet, and to convert the Java JKS key-store to P12/Microsoft PFX (Personal Information Exchange) format to share the same certificate with Java JAR files and Microsoft CAB files.
This allows software authors to increase the range of activities the Java Security Manager will permit.
| << Import Thawte Certificate to Sun Java JKS Key-store | Convert Sun Java JKS Keystore to Microsoft PFX format | Import Key & Certificate to Microsoft Key-store >> |
|---|
Now its time to export the private key and public certificate from the Sun Java JKS key-store into a format that can be understood by the Microsoft key-store.
Provided you've correctly followed my instructions in the Download and Install Tools section this should go smoothly.
If you have problems you might want to edit the KeyTools\JKS2PFX.bat, changing the first line from echo off to echo on so that when it runs it writes all its commands to the screen, to aid in debugging your problems. Most problems will be caused by the key-tools not being found on the PATH.
Run the JKS2PFX command. The arguments are key-store-filename password alias java-class-path-for-ExportPrvKey.class
JKS2PFX CodeSigning.jks mypassword CodeSigning C:\KeyTools

JKS2PFX creates a file called certificate.pfx in the CodeSigning folder.

| << Import Thawte Certificate to Sun Java JKS Key-store | Convert Sun Java JKS Keystore to Microsoft PFX format | Import Key & Certificate to Microsoft Key-store >> |
|---|
If you have any comments or simply find this guide a useful time-saver I'd welcome hearing from you. You can email me at codesigning@tjworld.net.
© Copyright 2004, 2005 TJ. You are welcome to link directly to this article and make a non-public personal copy (not redistributed or republished). The article must remain in XHTML form (mustn't be converted to proprietary formats such as PDF or DOC). If you would like to include it in a commercial service (e.g. a subscription or advertiser-supported web site) please ask.