- 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.