Skip to content

Support sites with invalid IDN in SslStream #82464

@wfurt

Description

@wfurt

There are cases when the name may be valid DNS name - and resolve by OS but it fails IDN checks.
Example of such names may be www-.colorhexa.com, xn--www-7m0a.thegratuit.com or www-.volal.cz.
#26167 also had some examples.

Currently we would fail to encode/decode the name and SslStream would fail unconditionally to complete handshake.
Browsers may show warnings but they allow to connect. So as some other HTTP implementations like curl.

The goal would be allowing users of SslStream to allow such handling using validation callback or validation policy.
While there may be some danger in allowing generic Unicode and binary, there seems to be no harm allowing plain ASCII that is not in direct violations of RFC 1035 (and common variations)

Further more, SslStream is not directly linked to DNS & IP protocol. While that is very likely most common scenario it can also be used on custom streams where the naming does not need to follow Internet standards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.SecurityenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions