Java client for the X.509 secured web-service

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 01:18:04

The keystore properties defines the certificate that identifies you to the server:

System.setProperty("javax.net.ssl.keyStore", keyStore);

This is a java keystore with your x509 certificate. You may create it using tha java program keytool.

System.setProperty("javax.net.ssl.trustStore", trustStore);

This is a java keystore with the certificate(s) that identifies the web site. This is only used by your web service software to ensure that you are really talking to the correct web site.

System.setProperty("javax.net.ssl.keyStoreType", "JKS"); System.setProperty("javax.net.ssl.trustStoreType", "JKS");

This just specifies that the format of the javax.net.ssl.keyStore and javax.net.ssl.trustStore is java keystore.

System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword); System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);

This is the password that was used to encrypt the java keystore when it was created.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!