This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Exporting/Importing PKI Keys. Help!!!" Watch "Exporting/Importing PKI Keys. Help!!!" New topic
Author

Exporting/Importing PKI Keys. Help!!!

Ram Swarna
Greenhorn

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
Author
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: http://aspose.com/file-tools
 
subject: Exporting/Importing PKI Keys. Help!!!