java - PKIX vs SunX509 in TrustManagerFactory and KeyManagerFactory -




i trying create ssl-context https.

i found code developer, no longer here.

            keystore keystore = keystore.getinstance("jks");             keystore.load(new fileinputstream(keystorefilename), password);             keymanagerfactory kmf = keymanagerfactory.getinstance("sunx509");             kmf.init(keystore, password);             trustmanagerfactory tmf = trustmanagerfactory.getinstance("pkix");             tmf.init(keystore);             sslcontext sslcontext = sslcontext.getinstance("tls");             sslcontext.init(kmf.getkeymanagers(), tmf.gettrustmanagers(), (securerandom)null); 

i wondering why used pkix in trustmanager , sunx509 in keymanager.

i found article, , did same thing. http://blog.palominolabs.com/2011/10/18/java-2-way-tlsssl-client-certificates-and-pkcs12-vs-jks-keystores/index.html

i understand difference between stores based on answer. https://stackoverflow.com/a/19988445/398909

but couldn't find conspicuous result pkix , sunx509.

i tried create managers different instances, , still working fine.





wiki

Comments

Popular posts from this blog

firebase - How to wait value in Ionic 2 -

Jenkins: find build number for git commit -

ROS vtk and kubuntu problems -