It's not a secret anymore!*
The moose likes Security and the fly likes KeyStore 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 » Engineering » Security
Bookmark "KeyStore" Watch "KeyStore" New topic
Author

KeyStore

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Hi,

I have a certificate and a KeyStore (including password),

how can i add these to my computer so that calls to a specific url will work,

any links or sample code/ideas will be cool,

Cheers,

Niall
Anil Kumar Saha
Ranch Hand

Joined: Apr 07, 2004
Posts: 111
Can you please be a bit more specif about your below requirement?
how can i add these to my computer so that calls to a specific url will work,


I know how to create a .keystore/.cert file and get the public/private key pair from them.


Regards,

Anil Kumar Saha
SCJP 1.4
http://www.agilej.blogspot.com/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
This post describes how to add a certificate to the systemwide JRE keystore.


Ping & DNS - my free Android networking tools app
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Thanks for the replies,

more info (if helpful :-) ):

i have trusted certificates and a KeyStore that is protected by a password,

i have an app created and trying to use these certificates and keystore file (and password) to connect to a https url,

if there are other info that is helpful please let me know,

Cheers for info in advance
Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

Hope this helps.
Aryan.



OCP/MCP/SCJP/SCWCD/IBM XML/SCMAD/SCEA-1
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
You can specify which keystore to use by starting the app like this (where mySrvKeystore is a file name or path):

But it'll be easier in the long run to install the certificate into the system-wide keystore; then you don't need to specify it any time you need to use it because then it'll be found and used automatically.
Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
are these correct:

- when certificates are created, there are 3 created:
# Identity certificate
# Root certificate
# Intermediate certificate

- a PKCS #12 file, is the same as a jks file, but in a different format and the certificates are loaded into the PKCS #12 file or the jks file

- the certificate that is loaded into the jks is the root certificate

- whats the difference between a keyStore and a trustore?

Cheers
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: KeyStore
 
Similar Threads
keystore password
how do i use a PKCS12 file
Does keystore change for every certificate imported
keytool problem
ftps in java