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

tls: remove deprecated tls.createSecurePair and SecurePair #57361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JonasBa
Copy link
Contributor

@JonasBa JonasBa commented Mar 7, 2025

createSecurePair has been deprecated since version 8, it should be safe to remove.

As far as I understand, there is a citgm workflow that would need to be run here to ensure we dont break any popular packages. Would someone be able to run that?

There is also a file left in benchmark/tls/secure-pair.js, which should probably be renamed now that securePair had been removed.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/net
  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tls Issues and PRs related to the tls subsystem. labels Mar 7, 2025
@anonrig anonrig requested a review from jasnell March 7, 2025 15:32
@JonasBa JonasBa force-pushed the jb/tls/secure-pair branch from c697c14 to 6f0b0b6 Compare March 7, 2025 15:33
@anonrig anonrig added semver-major PRs that contain breaking changes and should be released in the next major version. deprecations Issues and PRs related to deprecations. labels Mar 7, 2025
@anonrig
Copy link
Member

anonrig commented Mar 7, 2025

cc @nodejs/tsc since this requires 2 approvals from TSC members.

@JonasBa JonasBa force-pushed the jb/tls/secure-pair branch from 6f0b0b6 to 7774fb3 Compare March 7, 2025 15:41
Comment on lines -584 to -598
### Event: `'secure'`

<!-- YAML
added: v0.3.2
deprecated: v0.11.3
-->

The `'secure'` event is emitted by the `SecurePair` object once a secure
connection has been established.

As with checking for the server
[`'secureConnection'`][]
event, `pair.cleartext.authorized` should be inspected to confirm whether the
certificate used is properly authorized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that SecurePair class can now be removed, is it correct to remove this?

Copy link
Member

Choose a reason for hiding this comment

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

cc @nodejs/net

@jasnell
Copy link
Member

jasnell commented Mar 7, 2025

A github code search reveals a handful of uses in the ecosystem still but nothing that's been updated recently and nothing that's broadly depended on, so yeah, I'd agree it's likely safe.

@JonasBa JonasBa force-pushed the jb/tls/secure-pair branch from 7774fb3 to ddc6df8 Compare March 7, 2025 15:46
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 7, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 7, 2025
@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig changed the title tls: remove deprecated tls.createSecurePair tls: remove deprecated tls.createSecurePair and SecurePair Mar 7, 2025
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.21%. Comparing base (27f98c3) to head (ddc6df8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57361   +/-   ##
=======================================
  Coverage   90.20%   90.21%           
=======================================
  Files         630      629    -1     
  Lines      185307   185214   -93     
  Branches    36269    36253   -16     
=======================================
- Hits       167162   167093   -69     
- Misses      11084    11088    +4     
+ Partials     7061     7033   -28     
Files with missing lines Coverage Δ
lib/tls.js 95.93% <ø> (-0.07%) ⬇️

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JonasBa
Copy link
Contributor Author

JonasBa commented Mar 7, 2025

A github code search reveals a handful of uses in the ecosystem still but nothing that's been updated recently and nothing that's broadly depended on, so yeah, I'd agree it's likely safe.

@jasnell It had not occurred to me to do that, but I will make sure to check it myself next time, thank you!

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Issues and PRs related to deprecations. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants