File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Using private key installed on Sun One web server in java code. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using private key installed on Sun One web server in java code." Watch "Using private key installed on Sun One web server in java code." New topic
Author

Using private key installed on Sun One web server in java code.

Nandan Jain
Ranch Hand

Joined: Feb 14, 2006
Posts: 44
Hi,

I am digitally signing an XML string. I have been able to successfully do this using the .keystore and the JSSE API. Now I need to run this code in the SUN ONE Web server, hence i have installed the self signed certs in the web server.

How do i access the private key in my code now? Earlier i was just using the follwoing calls:

KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());

// Load the keystore contents
FileInputStream in = new FileInputStream(keystoreFile);
keystore.load(in, keystorePassword);
in.close();

now how do i access the private key and the certs that i have added in the web server? is there another API for this?

Any help will be appreciated!

Regards,
Nandan
 
jQuery in Action, 2nd edition
 
subject: Using private key installed on Sun One web server in java code.