【发布时间】:2017-06-21 05:07:42
【问题描述】:
尝试使用“https://”类型的肥皂网络服务。在我的 AppConfig.java 中设置以下系统属性。
@PostConstruct
public void init(){
Security.setProperty("ssl.SocketFactory.provider",
"com.ibm.jsse2.SSLSocketFactoryImpl");
Security.setProperty("ssl.ServerSocketFactory.provider",
"com.ibm.jsse2.SSLServerSocketFactoryImpl");
System.setProperty("java.protocol.handler.pkgs",
"com.ibm.net.ssl.internal.www.protocol");
try {
if(trustStore!= null){
File certFile = new File(trustStore);
if(certFile.exists()){
System.setProperty("https.protocols", "SSLv3");
System.setProperty("javax.net.ssl.trustStore", trustStore);
System.setProperty("javax.net.ssl.trustStorePassword",trustStorePassword);
System.setProperty("javax.net.ssl.keyStore", trustStore);
System.setProperty("javax.net.ssl.keyStorePassword",trustStorePassword);
String trustStoreType = "JKS";
System.setProperty("javax.net.ssl.trustStoreType",trustStoreType);
System.setProperty("javax.net.debug", "SSL");
printSysProps();
}}catch(Exception e){...}
请帮我解决这个问题。
【问题讨论】:
标签: java spring https ssl-certificate websphere-8