admin管理员组文章数量:1122832
In MAUI Android application I'm getting a strange SSL exception that starts appearing on larger responses. The larger response is, the more probability of this exception I get. The same request could succeed after few retries.
The response is a custom binary format wrapped in a GZip stream. When the error occurs in .NET it manifests itself by a standard HttpRequestException
"Error while copying content to a stream." which wraps Javax.Net.Ssl.SSLProtocolException
with the following error:
Read error: ssl=0x754d4d100b98: Failure in SSL library, usually a protocol error
error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT (external/boringssl/src/crypto/fipsmodule/cipher/e_aes.c:1078 0x754c37dd7112:0x00000000)
error:1000008b:SSL routines:OPENSSL_internal:DECRYPTION_FAILED_OR_BAD_RECORD_MAC (external/boringssl/src/ssl/tls_record:294 0x754c37dd7112:0x00000000)
I've tried a few hints I found online, like
- re-using HttpClient where possible (as this may be a re-use of a non-thread-safe SSL handle by internal SSL library)
- using different implementations of
HttpMessageHandler
(HttpClientHandler/AndroidMessageHandler
) - toggling
HttpCompletionOption.ResponseContentRead/ResponseHeadersRead
I've also checked on different certificates by connecting to systems where there are many Xamarin devices calling those endpoints without issues.
Would appreciate more ideas to try.
本文标签: netIntermittent SSL Error in MAUI Android using HttpClientStack Overflow
版权声明:本文标题:.net - Intermittent SSL Error in MAUI Android using HttpClient - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736301303a1931130.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论