8000 client: `with_single_cert` -> `with_client_auth_cert` by cpu · Pull Request #1345 · rustls/rustls · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

client: with_single_cert -> with_client_auth_cert #1345

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

Merged
merged 1 commit into from
Jul 9, 2023

Conversation

cpu
Copy link
Member
@cpu cpu commented Jul 6, 2023

client: with_single_cert -> with_client_auth_cert

This commit renames the ClientConfig builder's with_single_cert function to be called with_client_auth_cert. The old with_single_cert function is left as an alias for with_client_auth_cert and marked as deprecated to encourage users to switch to the new name.

I believe this offers better symmetry with the with_no_client_auth function that's used to disable client authentication, and more clearly conveys the purpose of this function is for providing a client authentication certificate.

@cpu cpu self-assigned this Jul 6, 2023
@ctz
Copy link
Member
ctz commented Jul 7, 2023

Like this change!

I believe this offers better symmetry with the with_no_client_auth function that's used to disable client authentication

It's also closer to with_client_cert_resolver function

@cpu cpu force-pushed the cpu-rename-client-config-with-single-cert branch from 7168276 to 46523a8 Compare July 7, 2023 15:34
@codecov
Copy link
codecov bot commented Jul 7, 2023

Codecov Report

Merging #1345 (8b267c6) into main (95dc0da) will decrease coverage by 0.05%.
The diff coverage is 12.50%.

@@            Coverage Diff             @@
##             main    #1345      +/-   ##
==========================================
- Coverage   96.43%   96.39%   -0.05%     
==========================================
  Files          61       61              
  Lines       14461    14468       +7     
==========================================
  Hits        13946    13946              
- Misses        515      522       +7     
Impacted Files Coverage Δ
rustls/src/builder.rs 98.83% <ø> (ø)
rustls/src/client/builder.rs 88.05% <12.50%> (-10.28%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cpu cpu marked this pull request as ready for review July 7, 2023 15:37
@cpu
Copy link
Member Author
cpu commented Jul 7, 2023

Like this change!

Cool 👍 I updated the PR desc, rebased on main and flipped the PR to ready for review.

@djc
Copy link
Member
djc commented Jul 7, 2023

I also like this change.

Should we do this as a deprecation with alias in the current release range, or in the next, before removing it entirely?

@cpu
Copy link
Member Author
cpu commented Jul 7, 2023

Should we do this as a deprecation with alias in the current release range, or in the next, before removing it entirely?

Sure, that sounds friendlier. I will adjust.

@cpu cpu force-pushed the cpu-rename-client-config-with-single-cert branch from 46523a8 to 09ce4e2 Compare July 7, 2023 16:37
This commit renames the `ClientConfig` builder's `with_single_cert`
function to be called `with_client_auth_cert`. The old
`with_single_cert` function is left as an alias for
`with_client_auth_cert` and marked as deprecated to encourage users to
switch to the new name.

I believe this offers better symmetry with the `with_no_client_auth`
function that's used to disable client authentication, and more clearly
conveys the purpose of this function is for providing a client
authentication certificate.
@cpu cpu force-pushed the cpu-rename-client-config-with-single-cert branch from 09ce4e2 to 8b267c6 Compare July 7, 2023 17:20
@cpu cpu added this pull request to the merge queue Jul 9, 2023
Merged via the queue into rustls:main with commit 0381e5a Jul 9, 2023
@cpu cpu deleted the cpu-rename-client-config-with-single-cert branch July 9, 2023 16:31
GM6VSxh91jVuHdt added a commit to GM6VSxh91jVuHdt/tokio-nats that referenced this pull request Aug 1, 2023
facebook-github-bot pushed a commit to facebook/buck2 that referenced this pull request Oct 31, 2023
Summary:
`rusttls::ClientConfig::with_single_cert` is deprecated in favor of
`with_client_auth_cert`. It's just a rename - no behavior change:
rustls/rustls#1345

Reviewed By: wxue

Differential Revision: D50798363

fbshipit-source-id: db72c872182442561fbb74cf809379b6ea0c88e3
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.

3 participants
0