wood burning stoves 2.0*
The moose likes Web Services and the fly likes How can i load keystore using java api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How can i load keystore using java api" Watch "How can i load keystore using java api" New topic
Author

How can i load keystore using java api

Amr k. Saleh
Ranch Hand

Joined: Aug 23, 2010
Posts: 41
Hi All,

I'm using glassfish application server, how can i load the keystore ?

KeyStore keystore = KeyStore.getInstance("JKS");
InputStream is = new FileInputStream(new File("???"));
keystore.load(is, "changeit".toCharArray());

what is the path should i provide for the File ? i want to use the default keystore


thanks in advance,
Amr Khaled
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Have a look at this on how to store, you can have a hint from that perhaps.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can i load keystore using java api
 
Similar Threads
keystore problem
how do i programmatically create a keystore and import my certificate into it?
SSL Cert Error - Mismatched Address
modify keystore
case of "UnrecoverableKeyException: DER input, Integer tag error"?