gpt4 book ai didi

android - Xamarin android 应用程序在某些设备上的 https 调用失败

转载 作者:太空宇宙 更新时间:2023-11-03 13:07:20 26 4
gpt4 key购买 nike

我在某些 Android 设备上遇到有关使用 modernhttpclient 进行 HTTPS 调用的问题。

请求在 4.2.2 上失败但在 5.1.1 上有效这是堆栈。

服务器证书受信任并由 Digicert 提供。

System.out] propertyValue:true
[System.out] [CDS]rx timeout:0
[System.out] [socket][2] connection myadress.myserver.com/someiphere:443;LocalPort=54298(0)
[System.out] [CDS]blocking mode socket with zero timeout
[System.out] [CDS]connect[myadress.myserver.com/someiphere:443]
[Posix] [Posix_connect Debug]Process com.package.name :443
[System.out] [CDS]port[54298]
[System.out] [socket][/172.20.10.8:54298] connected
[NativeCrypto] ssl=0x61c797b8 NativeCrypto_SSL_do_handshake fd=0x1eb00005 shc=0x1f600009 timeout_millis=0 client_mode=1 npn=0x0
[NativeCrypto] doing handshake ++
[NativeCrypto] ssl=0x61c797b8 info_callback where=0x10 ret=1
[NativeCrypto] ssl=0x61c797b8 handshake start in UNKWN before/connect initialization
[NativeCrypto] ssl=0x61c797b8 info_callback ignored
[NativeCrypto] ssl=0x61c797b8 info_callback where=0x1001 ret=1
[NativeCrypto] ssl=0x61c797b8 SSL_connect:UNKWN before/connect initialization
[NativeCrypto] ssl=0x61c797b8 info_callback ignored
[NativeCrypto] ssl=0x61c797b8 info_callback where=0x1001 ret=1
[NativeCrypto] ssl=0x61c797b8 SSL_connect:23WCHA SSLv2/v3 write client hello A
[NativeCrypto] ssl=0x61c797b8 info_callback ignored
[NativeCrypto] ssl=0x61c797b8 info_callback where=0x1002 ret=-1
[NativeCrypto] ssl=0x61c797b8 SSL_connect:error exit in 23RSHA SSLv2/v3 read server hello A
[NativeCrypto] ssl=0x61c797b8 info_callback ignored
[NativeCrypto] doing handshake -- ret=-1
[NativeCrypto] ssl=0x61c797b8 NativeCrypto_SSL_do_handshake ret=-1 errno=11 sslError=2 timeout_millis=0
[NativeCrypto] sslSelect type=READ fd=72 appData=0x61c7a898 timeout_millis=0
[NativeCrypto] sslSelect READ fd=72 appData=0x61c7a898 timeout_millis=0 => 1
[NativeCrypto] doing handshake ++
[NativeCrypto] ssl=0x61c797b8 info_callback where=0x1002 ret=-1
[NativeCrypto] ssl=0x61c797b8 SSL_connect:error exit in 23RSHA SSLv2/v3 read server hello A
[NativeCrypto] ssl=0x61c797b8 info_callback ignored
[NativeCrypto] doing handshake -- ret=-1
[NativeCrypto] ssl=0x61c797b8 NativeCrypto_SSL_do_handshake ret=-1 errno=104 sslError=5 timeout_millis=0
[NativeCrypto] Unknown error during handshake
[NativeCrypto] ssl=0x61c797b8 NativeCrypto_SSL_do_handshake unclean error => 0
[NativeCrypto] ssl=0x61c797b8 NativeCrypto_SSL_interrupt
[NativeCrypto] sslNotify, appData=0x61c7a898 ret=1
[NativeCrypto] sslNotify, appData=0x61c7a898 ret=1
[System.out] [CDS]close[54298]
[System.out] close [socket][/0.0.0.0:54298]
[System.out] [CDS]rx timeout:0

最佳答案

对于不受信任的证书(即为不同的 Common Name (CN) 生成),我遇到了相同的错误。使用具有正确 CN 的同一台服务器,它可以正常工作。

关于android - Xamarin android 应用程序在某些设备上的 https 调用失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33433304/

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