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
rustls requires hostname for server #206
Comments
One option would be, when failing to parse the DNS name using webpki's DNS name parser, to try to parse it as a IP address. If the IP address parsing succeeds after DNS name parsing fails, then report a more specific error. |
I think that it is far more common to have an IP there than an actual invalid hostname. "Failed DNS name parsing, are you using an IP address, that isn't currently supported." |
Would be nice if this one can be adressed somehow. |
I suggest we close this as a dupe of #184, as it seems to be the same issue. |
It seems like one hurdle to implementing this is the fact that Codec is implemented in terms of Option instead of Result. Has there been thought put into making Codec return Result in order to propagate failure types? |
Yeah, I think it would make sense to change Codec to yield Result types. |
The issues with the Thanks! |
I was trying to write a small test server with rustls and I run into this issue: briansmith/webpki#54
I was trying to use:
openssl s_client -connect 127.0.0.1:4888 -tls1_2
to test my server and it went up and died on me.The problem was that it gave this error:
Error: Io { source: Custom { kind: InvalidData, error: CorruptMessagePayload(Handshake) } }
This is a really bad experience. I understand that the dependency needs to be fixed, but in the mean time ( and in general ), reporting a better error in this case can make a lot of difference for figuring out what is wrong.
Changing
ServerNamePayload::read_hostname
to return aResult
with a clear indication of the failure, would be great.The text was updated successfully, but these errors were encountered: