-
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
[AndroidCrypto] Any TargetHost input is set as SNI hostname #79143
Comments
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsOn Android, we put any This is a problem when the hostname doesn't conform to the STD 3 ASCII rules (see One particular case, that also shows in our functional tests, are IPv6 addresses. The colon symbol is not allowed and an exception is thrown. The Android crypto PAL tracking issue (#45741) also mentions underscores in hostnames. The RFC 6066 that defines SNI states:
I think that our Android PAL shouldn't throw exceptions when /cc @wfurt
|
The IPv6 LLA should be fixed by #81631. It seems like the RFC forbids us to pass in IP literals. Now there has been some chatter about allowing SslStream to connect to sites that do not conform to the spec. |
@simonrozsival @wfurt is this still an issue? |
@steveisok I think the issue has been sufficiently resolved with #81631. There are still three tests that we currently skip and need re-enabling. I opened #89232 to re-enable those tests and I think we can close this issue once that PR is merged. |
On Android, we put any
TargetHost
passed to a clientSslStream
into the SNI hostname:SafeDeleteSslContext:252
pal_sslstream.c:500-540
This is a problem when the hostname doesn't conform to the STD 3 ASCII rules (see
SNIHostName
docs). In this case, the code throws an exception and we can't establish communication with the server.One particular case, that also shows in our functional tests, are IPv6 addresses. The colon symbol is not allowed and an exception is thrown. The Android crypto PAL tracking issue (#45741) also mentions underscores in hostnames.
The RFC 6066 that defines SNI states:
I think that our Android PAL shouldn't throw exceptions when
SNIHostName
rejects an IPv6 address and it should proceed with the handshake./cc @wfurt
Ref #77386 (comment)
The text was updated successfully, but these errors were encountered: