webpki
webpki copied to clipboard
InvalidDNSNameError has no info about which name
When InvalidDNSNameError
is returned there is no additional information about which DNS Name is invalid.
When
InvalidDNSNameError
is returned there is no additional information about which DNS Name is invalid.
Could you provide some example code that shows where InvalidDNSNameError
occurs? AFAICT the only place it can happen is where your own code attempts to construct a DNSName
, and in that case you know exactly what the input is.
If I remember correctly this was because I was using tonic
and hyper-rustls
and they created a DNS name which should have been a URI but the error was coming from this package.
If I remember correctly this was because I was using
tonic
andhyper-rustls
and they created a DNS name which should have been a URI but the error was coming from this package.
It is true that the design of InvalidDNSNameError
makes it easy for those libraries to avoid reporting the name that was invalid. However, I'm not very eager to change it right now. Are there issues in the tonic and hyper-rustls repos about it?