-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] SSLStream throws 'Handshake has already been started' on API level 26 #78716
Comments
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsThe following block will throw an exception with
Exception: Time Device Name Type PID Tag Message
11-22 16:06:53.606 pixel_5_-_api_26 Warning 8609 System.err java.lang.IllegalStateException: Handshake has already been started
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshakeInternal(OpenSSLEngineImpl.java:335)
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshake(OpenSSLEngineImpl.java:325)
11-22 16:06:53.607 pixel_5_-_api_26 Verbose 8609 SequriX Push error: System.Security.Authentication.AuthenticationException: net_auth_SSPI
---> Interop+AndroidCrypto+SslException: Exception_WasThrown, Interop+AndroidCrypto+SslException
Exception_EndOfInnerExceptionStack
at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__175`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
at SuperSocket.ClientEngine.SslStreamTcpSession.AuthenticateAsClientAsync(SslStream sslStream, SecurityOption securityOption)
|
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsThe following block will throw an exception with
Exception: Time Device Name Type PID Tag Message
11-22 16:06:53.606 pixel_5_-_api_26 Warning 8609 System.err java.lang.IllegalStateException: Handshake has already been started
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshakeInternal(OpenSSLEngineImpl.java:335)
at com.android.org.conscrypt.OpenSSLEngineImpl.beginHandshake(OpenSSLEngineImpl.java:325)
11-22 16:06:53.607 pixel_5_-_api_26 Verbose 8609 SequriX Push error: System.Security.Authentication.AuthenticationException: net_auth_SSPI
---> Interop+AndroidCrypto+SslException: Exception_WasThrown, Interop+AndroidCrypto+SslException
Exception_EndOfInnerExceptionStack
at System.Net.Security.SslStream.<ForceAuthenticationAsync>d__175`1[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
at SuperSocket.ClientEngine.SslStreamTcpSession.AuthenticateAsClientAsync(SslStream sslStream, SecurityOption securityOption)
|
This also effects SocketsHttpHandler and ClientWebSocket usage with HTTPS. For example: var client = new HttpClient(new SocketsHttpHandler());
await client.GetStringAsync("https://google.com"); |
This is likely related to dotnet/SqlClient#1656 |
I reproduced the issue locally and it should be possible to fix it. I should have a fix ready soon. |
The following block will throw an exception with
Handshake has already been started
on API level 26. Appears to be specific to our SSLEngine usage.Exception:
The text was updated successfully, but these errors were encountered: