I’ve created two servers locally, and I’m going to apply a mutual authentication to their communication. I just don’t know what the problem is. I lack understanding of this mechanism, but I also lack understanding of the server itself. Create each key store Export to X.509 to register certif…
Tag: keytool
IOException in Java 8 when reading PKCS12 keystore created with keytool from OpenJDK16
TL;DR keytool from OpenJDK16 creates PKCS12 keystore files that cannot be read from Java 8, 9, 10 and 11. Is this a bug? How to create a PKCS12 keystore that works with Java 8? Context I build a Maven project which produces an executable JAR file that must run on any JRE from version 8 to version 16. That JAR
How can I “diff” two cacerts files?
I have two Tomcat servers, with different “cacerts” files. On one, running “keytool -list -keystore cacerts” says my keystore contains 95 entries, on the other, it says 96. I tried saving the list outputs and running diff against them, but the certificates seem to be in different order…
unable to find valid certification path to requested target google recaptcha in java maven application
I’ve made a Maven webapplication with a contactform with Google reCaptcha v3 which is running on Glassfish 5 on a Centos server. The contactform page makes a request to https://www.google.com/recaptcha/api/siteverify and sends a token and a site key. You’ll get a json object answering the question…
keytool error: java.io.IOException: keystore password was incorrect
Created a Certificate for Tomcat, trying to get it installed in new keystore, and getting error (Edit: ran it with -v option, now getting more info): Sadly, it’s correct, the passphrase has two “®”. So, given what I’ve done (the private key has the non-ASCII password), how much of a pa…
Keytool EC KeyPairGenerator not available
When I use keytool to generate a key with ECC, I get this error: Error keytool: java.security.NoSuchAlgorithmException: EC KeyPairGenerator not available Then syntax used to generate a key is: I have this Java version: Answer I solved the problem by reading the following article (linked by the user @QuakeCore…
java.lang.Exception: Public keys in reply and keystore don’t match
I have to access a webservice hosted at port 443.Service provider has shared three certificate with us. ABCD.cer CA_Certificate.cer CCA_Certificate.cer I have to add them to keystore by creating a form chain for the SSL communication.I have followed below steps. keytool -keystore npci_keystore_test.jks -genke…
Unable to import certificate to cacerts
My requirement is to import a certificate for maven repositories into the global keystore. The certificate file is named maven-cacert.cer . I am using following command from C:Program FilesJavajdk1.6.0_20bin from cmd as maven-cacert.cer file is in C directory after pressing enter it asked to put password and …
How do I solve javax.net.ssl.SSLHandshakeException on Heroku?
I faced SSLHandshakeException on Heroku. This app was not SSL app. But this app called a ssl-based web api from inside of the app. Usually, using keytool to adopt SSL cert to JVM solves this kind of problem. But how do I this on Heroku? logs here: Answer When you are making a SSL connection to a server, you s…
Unable to find valid certification path to requested target – error even after cert imported
I have a Java client trying to access a server with a self-signed certificate. When I try to Post to the server, I get the following error: unable to find valid certification path to requested target Having done some research on the issue, I then did the following. Saved my servers domain name as a root.cer f…