It's not a secret anymore!
The moose likes Security and the fly likes Exporting/Importing PKI Keys. Help!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "Exporting/Importing PKI Keys. Help!!!" Watch "Exporting/Importing PKI Keys. Help!!!" New topic

Exporting/Importing PKI Keys. Help!!!

Ram Swarna

Joined: Jan 23, 2004
Posts: 2
Hi All,
Can some one tell me if there is way to export the keys that are genrated in Java to .Net or from .Net to java. Is there a work around?
I need the keys so that a Soap message that is signed by a .Net client be verified at the Server end that is implemented in Java, one point that i would like to mention is that i cannot send the public key as a part of the Key Info of the signature, which is the conventional method for the business reasons.
Thanks in advance.
Pankaj Kr
Ranch Hand

Joined: Sep 09, 2003
Posts: 80
Not having worked with .Net, I am assuming that .Net takes the private key and the public key (as part of the certificate) from Windows certificate store (the same one that you access from IE, Outlook Express and other Windows applications).
If this is so, then you can easily export the certificate (and hence the public key), in a DER or PEM (BASE64 encoded) format (In IE, do Tools --> Internet Options --> Content --> Certificates; then select the certificate and click on Export ). Once you have this, you can import the certificate in a Java keystore using keytool and use it within a Java program to verify the signature.

Pankaj Kumar
Home - WebLog - J2EE Security
I agree. Here's the link:
subject: Exporting/Importing PKI Keys. Help!!!
It's not a secret anymore!