Skip to content

tls.TLSSocket.ssl._external access triggers assertion error #6338

@ghost

Description

  • Version: 4.2.6
  • Platform: Linux
  • Subsystem: SSL/TLS

Hi,

I'm working on SSL connection transfer from Node.js HTTPS server to a native addon. This means I need to access the OpenSSL SSL *pointer in order to use SSL_write and the like.

I have gotten help from Fedor Indutny, pointing me to the tls.TLSSocket.ssl._external for getting the SSL pointer. However, the very accessing of this _external getter (It seems to be a getter function) causes an assertion error to trigger:

node: ../src/util-inl.h:196: TypeName* node::Unwrap(v8::Local<v8::Object>) [with TypeName = node::TLSWrap]: Assertion (object->InternalFieldCount()) > (0)' failed.`

This happens even when no addon code has run, this is caused by the very JS-code accessing _external.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.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