gpt4 book ai didi

android - 使用 HTTPS 的 ionic

转载 作者:行者123 更新时间:2023-11-29 01:38:58 26 4
gpt4 key购买 nike

我正在使用 Ion,但是当我尝试将它与 Https 一起使用时,它给了我一个异常(exception)。

代码:

Ion.with(getApplicationContext())
.load(mBaseUrl + "Token")
.setJsonObjectBody(json)
(...)

异常(exception):

09-24 11:53:00.211  17654-17940/com.gfi.connectelu W/System.err﹕ javax.net.ssl.SSLHandshakeException: Handshake failed
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.google.android.gms.org.conscrypt.OpenSSLEngineImpl.unwrap(SourceFile:421)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncSSLSocketWrapper$4.onDataAvailable(AsyncSSLSocketWrapper.java:172)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.BufferedDataEmitter.onDataAvailable(BufferedDataEmitter.java:33)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.BufferedDataEmitter.onDataAvailable(BufferedDataEmitter.java:61)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.Util.emitAllData(Util.java:20)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:175)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:766)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:608)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncServer.access$700(AsyncServer.java:37)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.koushikdutta.async.AsyncServer$13.run(AsyncServer.java:557)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:282)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:192)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.google.android.gms.org.conscrypt.Platform.checkServerTrusted(SourceFile:158)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.google.android.gms.org.conscrypt.OpenSSLEngineImpl.verifyCertificateChain(SourceFile:629)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake_bio(Native Method)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ at com.google.android.gms.org.conscrypt.OpenSSLEngineImpl.unwrap(SourceFile:411)
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ ... 10 more
09-24 11:53:00.211 17654-17940/com.gfi.connectelu W/System.err﹕ Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

最佳答案

最近有报道issue about SSL Handshake在 ionic 上:

与此同时,您也许可以看看 Ion: add support for self signed certificates

关于android - 使用 HTTPS 的 ionic ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26015139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com