https - How to add a *.P12 keystore (with one entry)? -
apologies lack of understanding of certificates in general. have .p12
file (with non-expired certificate) , valid password can list
contents using:
keytool -list -keystore file.p12 -storepass password -storetype pkcs12 -v
in java code attempting https post keep getting error:
javax.net.ssl.sslhandshakeexception: java.security.cert.certificateexception: no name matching [host.path.com] found
this same post works against 1 of other environments not have authentication required , link http (vs. https). how make .p12
file work recognized in handshake?
you use following command
keytool -v -importkeystore -srckeystore alice.p12 -srcstoretype pkcs12 -destkeystore "c:\program files\java\jre1.8.0_71\lib\security\cacerts" -deststoretype jks
default password cacerts changeit
where trust store jre trust store
please refer here more information http://www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/
Comments
Post a Comment