简体   繁体   English

在 java 中使用 Retrofit 的 Okhttp 问题

[英]Okhttp issue using Retrofit in java

I/okhttp.OkHttpClient: <-- HTTP FAILED: javax.net.ssl.SSLPeerUnverifiedException: Hostname ttslive.com not verified: certificate: sha256/i253ekxmSHEVN5aD4LQN6FPy53jbfY0aasjzLgzzYgc= I/okhttp.OkHttpClient: DN: CN=imfitow.com subjectAltNames: [imfitow.com] I/okhttp.OkHttpClient: <-- HTTP FAILED: javax.net.ssl.SSLPeerUnverifiedException: Hostname ttslive.com not verified: certificate: sha256/i253ekxmSHEVN5aD4LQN6FPy53jbfY0aasjzLgzzYgc= I/okhttp.OkHttpClient: DN: CN=imfitow.com subjectAltNames: [imfitow .com]

Try again by setting your destination URL to http or https .通过将目的地 URL 设置为httphttps再试一次。

Also check that your destination URL supports SSL.还要检查您的目的地 URL 是否支持 SSL。

The certificate being served for ttslive.com was for a different domain, imfitow.com, hence the failure.为 ttslive.com 提供的证书用于不同的域 imfitow.com,因此失败。 It has subsequently been fixed so likely your request will succeed now.它随后已得到修复,因此您的请求现在很可能会成功。

$ ./cft --host ttslive.com 
CN:     www.ttslive.com
Pin:    sha256/6883961b59af6eb8445adbedf0182885be19f6d710227308ec3f3924c1d6c6d1
SAN:    ttslive.com, www.ttslive.com
Key Usage: DigitalSignature, KeyEncipherment
Ext Key Usage: serverAuth, clientAuth
Authority Info Access:
    ocsp: http://ocsp.int-x3.letsencrypt.org
    caIssuers: http://cert.int-x3.letsencrypt.org/
Valid:  2020-10-10T07:11:46Z..2021-01-08T07:11:46Z (2 months)
CA: false

CN:     Lets Encrypt Authority X3
Pin:    sha256/60b87575447dcba2a36b7d11ac09fb24a9db406fee12d2cc90180517616e8a18
SAN:    <N/A>
Key Usage: DigitalSignature, KeyCertSign, CRLSign
Authority Info Access:
    ocsp: http://isrg.trustid.ocsp.identrust.com
    caIssuers: http://apps.identrust.com/roots/dstrootcax3.p7c
Valid:  2016-03-17T16:40:46Z..2021-03-17T16:40:46Z (4 months)
CA: true Max Intermediate: 0

CN:     DST Root CA X3 (signed by locally-trusted root)
Pin:    sha256/563b3caf8cfef34c2335caf560a7a95906e8488462eb75ac59784830df9e5b2b
SAN:    <N/A>
Key Usage: KeyCertSign, CRLSign
Valid:  2000-09-30T21:12:19Z..2021-09-30T14:01:15Z (11 months)
CA: true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM