Skip to content

tls: make deprecated tls.createSecurePair() use public API

Make the deprecated tls.createSecurePair() method use other public APIs only (TLSSocket in particular).

Since tls.createSecurePair() has been runtime-deprecated only since Node 8, it probably isn’t quite time to remove it yet, but this patch removes almost all of the code complexity that is retained by it.

The API, as it is documented, is retained. However, it is very likely that some users have come to rely on parts of undocumented API of the SecurePair class, especially since some of the existing tests checked for those. Therefore, this should definitely be considered a breaking change.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

tls

Merge request reports

Loading