-
-
Notifications
You must be signed in to change notification settings - Fork 498
Add an option to retrieve TLS errors #2449
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
base: main
Are you sure you want to change the base?
Conversation
djc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems mostly reasonable.
|
Oh, I didn't notice that I'm not sure which option would be better in this case. |
Definitely don't think |
Yeah, I was thinking of using |
|
I've ended up using |
| } | ||
| } | ||
|
|
||
| impl Eq for Error {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should ditch this impl outright? Users should probably only be performing comparisons on code anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would mean dropping PartialEq, Eq from the ConnectionError here https://github.com/quinn-rs/quinn/blob/main/quinn-proto/src/connection/mod.rs#L3917, or converting it to an ugly manual impl. Perhaps we should keep the comparison here, but only for the code field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems to be referencing Eq but not PartialEq. I think it'd be okay to drop Eq from ConnectionError, but we should probably try to preserve PartialEq.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I assumed differently, as in that case, there's little difference between Eq and PartialEq. @Ralith can you clarify what you meant?
Users should probably only be performing comparisons on code anyway.
Regarding this, I rewrote the PartialEq comparison to include only code. Is that OK?
quinn-proto/src/transport_error.rs
Outdated
| /// Human-readable explanation of the reason | ||
| pub reason: String, | ||
| /// An underlying TLS layer error | ||
| pub tls: Option<Arc<dyn std::error::Error + Send + Sync>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we name/document this in a more generic way? While QUIC requires TLS, Quinn technically doesn't, and we have some non-TLS downstream users. We refer to the "crypto" layer elsewhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed the field to crypto and updated the doc comment.
Signed-off-by: Mateusz Szczygieł <[email protected]>
|
I've updated the |
Hello,
I'm using
quinncreate together with TLS Encrypted Client Hello (ECH) extension.However, I encountered a problem where the client uses an invalid server ECH config. There is a mechanism described in the ECH RFC that the server can respond with the correct config, and the client can reconnect using it instead.
And theoretically, the
rustlscrate offers a way to retrieve the server ECH config from the TLS error, as discussed in rustls/rustls#2572.Sadly, when using the
quinncrate, there is no way to retrieve the underlying TLS error and extract the ECH config.This PR aims to provide a way to get the underlying
rustlserror and effectively allow for ECH client retry.