我无法使用java连接到IMAP服务器并保持geeting:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:298)
使用openssl我查看了证书,我对主题和发行人部分感到困惑。
来自Java certifacte商店的CA证书:
Issuer: DC=at, DC=XXX, DC=intern, CN=intern-SERVER14-CA
Validity
Not Before: Nov 19 13:37:52 2014 GMT
Not After : Nov 18 13:37:52 2016 GMT
Subject: C=AT, ST=Vlbg, L=XXX, O=XXX, OU=XXX, CN=outlook.XXX.at
使用openssl从IMAP服务器获取的证书:
Issuer: CN=server14
Validity
Not Before: Oct 28 16:18:51 2014 GMT
Not After : Oct 28 16:18:51 2019 GMT
Subject: CN=server14
不应该至少某些主题/发行人部分匹配吗?
尝试openssl verify
会给我servercert.pem: /CN=server14
error 20 at 0 depth lookup:unable to get local issuer certificate