Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

KeyStore

 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This post describes how to add a certificate to the systemwide JRE keystore.
 
Niall Loughnane
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 290
Oracle Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope this helps.
Aryan.

 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I think I'll just lie down here for a second. And ponder this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic