2016-04-25 132 views
0

我跑openssl s_client -connect mywishboard.com:443 | openssl x509 -noout -subject -issuer ,我得到以下有關證書的信息(由客戶端開發人員設置好的)Android不信任證書

depth=2 C = IL, O = StartCom Ltd., OU = Secure Digital Certificate Signing, CN = StartCom Certification Authority 
verify return:1 
depth=1 C = IL, O = StartCom Ltd., OU = StartCom Certification Authority, CN = StartCom Class 1 DV Server CA 
verify return:1 
depth=0 CN = mywishboard.com 
verify return:1 
subject= /CN=mywishboard.com 
issuer= /C=IL/O=StartCom Ltd./OU=StartCom Certification Authority/CN=StartCom Class 1 DV Server CA 

然後我檢查去Settings/system/trusted certificats,看到StartCom有限公司是其中 enter image description here

然而,當我特林讓HTTPS請求,他們拋出

javax.net.ssl.SSLHandshakeException: 
java.security.cert.CertPathValidatorException: 
Trust anchor for certification path not found 

如果我使用捲曲-I https://mywishboard.com/xxx,它返回

curl: (60) server certificate verification failed. CAfile: /etc/ssl 
/certs/ca-certificates.crt CRLfile: none 

是該證書的格式不正確,或者我需要明確地將其安裝到Android設備?(但據我瞭解,如果證書與信任的CA發行人簽署的,比我並不需要安裝它,我是右)

+0

CA不是StarCom是GoDaddy ..再次檢查證書。 – vzamanillo

+0

@vzamanillo剛剛檢查:'issuer =/C = IL/O = StartCom Ltd./OU=StartCom證書頒發機構/ CN = StartCom Class 1 DV Server CA'或者我檢查的方式錯誤? (我使用openssl s_client -connect mywishboard.com:443) – Yarh

+0

只需簡單地連接到https URL,無需端口並再次檢查證書 – vzamanillo

回答

0

有兩個潛在的問題:

  • 使用的根CA是「去爸爸根證書頒發機構 - G2」這可能不是?可在你的Android設備。
  • 服務器不提供中級CA「Go Daddy 安全證書頒發機構-G2」。服務器證書由根CA「Go Daddy Root Certificate Authority-G2」頒發的中級CA「Go Daddy安全證書頒發機構 - G2」頒發。對於Web服務器來說,這不是一個問題,因爲他們能夠使用來自服務器證書的AIA擴展來下載中間CA,但是您的Java應用程序不會,除非您開發此功能。
相關問題