Skip to content

default secure context is not created with options passed to TLSSocket constructor #10643

@jkryl

Description

@jkryl
  • Version: v4.6.1
  • Platform: SunOS
  • Subsystem: tls

Spotted on 4.6.1 but seems to be the case even with the latest node version.
Documentation for TLSSocket() says that if secureContext is not specified it is created passing the same options as to TLSSocket constructor:

https://nodejs.org/api/tls.html#tls_class_tls_tlssocket

but looking at the code it is not true:

https://github.com/nodejs/node/blob/master/lib/_tls_wrap.js#L351

secureContext is created without any options. I found it out by passing key and cert options to TLSSocket() which were simply ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions