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: use DEFAULT_CIPHER_SUITES if none are specified #164

Closed

Conversation

kevinburke
Copy link
Contributor

I'm having trouble figuring out how to pass in a set of cipher suites
using C, and since all I want is the default set, just make it easier
by providing a reasonable default for the NULL case.

Fixes #163.

@kevinburke kevinburke force-pushed the default-builder-suites branch from dd7468c to 7aaf881 Compare October 30, 2021 03:35
@kevinburke kevinburke changed the base branch from main to config-builder October 30, 2021 03:35
@kevinburke kevinburke force-pushed the default-builder-suites branch from 7aaf881 to da12657 Compare October 30, 2021 03:36
I'm having trouble figuring out how to pass in a set of cipher suites
using C, and since all I want is the default set, just make it easier
by providing a reasonable default for the NULL case.

Fixes rustls#163.
@kevinburke kevinburke force-pushed the default-builder-suites branch from da12657 to 9877fb4 Compare October 30, 2021 04:41
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 seems like a nice usability tweak!

@jsha
Copy link
Collaborator

jsha commented Nov 2, 2021

I like this! I would like a little more an explicit option where you could pass something like:

rustls_client_config_builder_new_custom(
  RUSTLS_DEFAULT_CIPHER_SUITES,
  RUSTLS_DEFAULT_CIPHER_SUITES_LEN,
  tls_versions,
  tls_versions_len)

But I think that would require rustls-ffi to make a copy of rustls::DEFAULT_CIPHER_SUITES so that it could present a #[repr(C)] view of them, which is a little awkward. I'll think on it a bit more - but if we don't come up with a nicer solution shortly we should go ahead and merge this, which is plenty nice too.

@jsha jsha deleted the branch rustls:config-builder November 3, 2021 00:26
@jsha jsha closed this Nov 3, 2021
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.

rustls_client_config_builder_new: use the default set if cipher_suites is NULL
3 participants