I already added the certificate for my domain to a java keystore and followed this answer to set up my HTTPSServer: Simple Java HTTPS server. Now I want to add my intermediate certificate too. I have the .cer file of it but I don't know how I can add it, so that my server can find and use it.
Previously I added the certificate by converting it with the openssl
command and then using the keytool
command to import it to my keystore, but that doesn't work for the intermediate certificate.
Asked
Active
Viewed 159 times
0

PockelHockel
- 7
- 1
- 9
-
If you dislike command-line utils you can just use https://keystore-explorer.org. It allows to import certificates into keystore using a nice GUI. – Robert May 20 '20 at 17:37
-
Thank you, that really helped me. – PockelHockel May 20 '20 at 17:58
-
BTW: I am hoping that with "a java keystore" you mean a newly created keystore and not the trust-keystore that comes with Java. Modifying the keystore that comes with Java is possible but very bad style and should be avoided. – Robert May 20 '20 at 18:03
-
Yes, I mean a newly created one. – PockelHockel May 20 '20 at 18:07
1 Answers
1
I solved it by appending the intermediate certificate to my certificate in the keystore explorer. Thanks to Robert.

PockelHockel
- 7
- 1
- 9