I am using jdk 1.6 on windows. I have a .der file (DER Encoded X509 Certificate) that I would like to add cacerts to my file ... so I tried the following:
keytool -import -keystore "C: \ Program Files \ Java \ jdk1.6.0_27 \ jre \ lib \ security \ cacerts" -trustcacerts -alias openldap -file "C: \ cacert.der"
The following error occurred:
java.security.cert.CertificateParsingException: java.io.IOException: subject key, java.security.spec.InvalidKeySpecException: unknown key
At first, I decided that this was a problem with the der certificate, but after that I got exactly the same error:
keytool -list -keystore "C: \ Program Files \ Java \ jdk1.6.0_27 \ jre \ lib \ security \ cacerts"
Any ideas why this issue occurs? I did not find anything on the web. Thanks in advance.
source
share