Skip to content
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

Client configuration API #57

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Client configuration API #57

merged 1 commit into from
Oct 15, 2018

Conversation

Ralith
Copy link
Collaborator

@Ralith Ralith commented Oct 13, 2018

  • Allow configuration of individual clients within an endpoint
  • Implement feature-gated config helper for untrusted connections
  • Don't enable keylogging by default
  • Test rejection of invalid certs

Candidate to address #35.

@Ralith Ralith force-pushed the dangerous-configuration branch 3 times, most recently from 66e2ccf to 6622dd7 Compare October 14, 2018 04:27
Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might have been nicer as 4 separate commits, something to keep in mind for the future?

@@ -323,6 +329,7 @@ impl Connection {
data_recvd: 0,
local_max_data: config.receive_window as u64,
server_name: None,
tls_config: None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this very much. We're putting a Config state in here, optionally only for the initiators, which is only used in the very short time between the instantiation of the Connection and the connect(). Seems to me like we might want to create a new_client() constructor instead that just does the connect() bits straightaway, and then we don't have to store the ClientConfig.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ClientConfig is stored for use in resetting state on retry packet receipt. That said, I'm not actually sure resetting TLS state is necessary; tests pass and draft 11 doesn't seem to specifically require it. It won't be needed in draft 15 either, so I'll just strip it out.

config: &Arc<ClientConfig>,
server_name: &str,
) -> Result<(), ConnectError> {
assert_eq!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're asserting this here, should we have a similar assert for the server side?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, rustls contains a similar assert already, so perhaps this should be removed.

quinn-proto/src/tests.rs Show resolved Hide resolved
@Ralith
Copy link
Collaborator Author

Ralith commented Oct 14, 2018

Yeah, got a bit carried away with the big blob o' intermingled changes, apologies.

@Ralith Ralith force-pushed the dangerous-configuration branch 2 times, most recently from bc2469e to cb6fead Compare October 15, 2018 05:22
djc
djc previously approved these changes Oct 15, 2018
Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments.

I noticed you had a commit to remove the unit test socket things. I was thinking we might make them optional, disabled by default; would that work for you? I understand that they can be a bit of a pain, but debugging with Wireshark can be really helpful.

@Ralith
Copy link
Collaborator Author

Ralith commented Oct 15, 2018

That commit disappeared when I realized the nondeterminism was just that I'd left a test server running in the background. Disabled-by-default (perhaps mediated by an env var?) would make sense, but so long as it's easy to run them in practice I don't think it's urgent.

- Allow configuration of individual clients within an endpoint
- Implement feature-gated config helper for untrusted connections
- Don't enable keylogging by default
- Test rejection of invalid certs
@Ralith Ralith merged commit 6741657 into master Oct 15, 2018
@Ralith Ralith deleted the dangerous-configuration branch October 15, 2018 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants