Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Keystore import

 
Jeffrey van den Wijngaard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

I'm trying to import a new certificate into a jks file.

This jks file contains 2 entries and the first one needs to be updated because it expired.

I have a new file (with extension .abc) which contains the new certificate.

When I use jetty's PKCS12Import, it creates a new jks file with the new certificate only.

So what I need to know is how to import the new certificate into the existing jks file overwriting the old certificate (which is expired)

Thanks in advance!
 
Set Cruz
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeffrey, what I would do is just rename the new jks file from jetty's import tool (which I'm not familiar with) and give it the name of the keystore with the invalid key pair.
 
Jeffrey van den Wijngaard
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Set,

Thank you for your reply.

I found a tool which did exactly what I needed.
It's KeyMan, which allows users to create new keystores, open and edit existing keystores.

So I just imported the existing keystore with the expired certificate, deleted it from the jks with KeyMan and imported the new one and changed the alias and now it's ok.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic