javax.net.ssl.SSLHandshakeException:证书已过期 - 本地或远程?
问题描述:
在尝试建立到Web服务的SSL连接时,我收到以下异常。这个错误是否意味着我的本地密钥库/证书已过期,还是我不能信任远程服务器,因为它有过期的证书?javax.net.ssl.SSLHandshakeException:证书已过期 - 本地或远程?
javax.net.ssl.SSLHandshakeException: certificate expired
at com.ibm.jsse.bs.a(Unknown Source)
at com.ibm.jsse.bs.startHandshake(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.o(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.q.connect(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.cg.getOutputStream(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.t.getOutputStream(Unknown Source)
答
远程证书过期,webservice的应用服务器需要更新其证书。
答
看到这里http://www.cs.sunysb.edu/documentation/jsse/jssefaq.html#17
例如将SystemProperty javax.net.debug设置为ssl:
java -Djavax.net.debug=ssl ...