Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Nandan Jain
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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);

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!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!