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.TLSSocket.ssl._external access triggers assertion error #6338

Closed
ghost opened this issue Apr 21, 2016 · 3 comments
Closed

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

ghost opened this issue Apr 21, 2016 · 3 comments
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. tls Issues and PRs related to the tls subsystem.

Comments

@ghost
Copy link

ghost commented Apr 21, 2016

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

@silverwind silverwind added the tls Issues and PRs related to the tls subsystem. label Apr 21, 2016
@mscdex mscdex added the c++ Issues and PRs that require attention from people who are familiar with C++. label Apr 21, 2016
@bnoordhuis
Copy link
Member

That was fixed last month in #5521 and will be part of a v4.x release sometime soon.

@ghost
Copy link
Author

ghost commented Apr 22, 2016

Sorry for the duplicate then :)

@bnoordhuis
Copy link
Member

No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants