Alex,

This is exactly what I was talking about, you may want to use
`socket.ssl._secureContext._external` to get pointer to the `SSL_CTX`
structure in a safe way.

While possible, accessing and using TLSSocket directly is not officially
supported, and may make your application broken even with a path version
update of node.js .

Cheers,
Fedor.

On Sun, Apr 17, 2016 at 9:08 AM, Alex Hultman <alexhult...@gmail.com> wrote:

> Hi Fedor,
>
> I did watch the code and I think I know how to get the OpenSSL stuff I
> need. But I'm not all sure about how to get from the JS object
> (tls.TLSSocket) to the native underlying structure? Do you know how I
> should do this? I'm sure I could figure it out by looking some more in the
> code but I thought someone might already know this and could guide me a
> little?
>
> Den fredag 15 april 2016 kl. 21:25:17 UTC+2 skrev Fedor Indutny:
>>
>> Hello!
>>
>> Have you tried accessing `._external` property of `SecureContext`
>> instance? It is basically a wrapped pointer to `SSL_CTX`.
>>
>> Hope this helps,
>> Fedor.
>>
>> On Fri, Apr 15, 2016 at 8:45 AM, Alex Hultman <alexh...@gmail.com> wrote:
>>
>>> I have found that TLSWrap exposes a function, ssl() which gives me the
>>> SSL pointer. But how would I then get this TLSWrap from the passed JS
>>> socket? Will it be stored directly in the hidden pointer 0, or will there
>>> be a uv_stream_t stored at that position, having its data member set to the 
>>> TLSWrap
>>> object?
>>>
>>> Den fredag 15 april 2016 kl. 01:07:50 UTC+2 skrev Alex Hultman:
>>>>
>>>> Hi,
>>>>
>>>> I'm working on this (native) WebSocket server project:
>>>> https://github.com/alexhultman/uWebSockets. It supports transferring
>>>> connections from the built-in Node.js http.Server to the addon, letting it
>>>> handle the WebSocket connections.
>>>>
>>>> Now, I'm looking at transferring the OpenSSL context from Node.js to
>>>> the addon, to also allow seamless transfers from https.Server to the addon.
>>>> I've looked a bit at the tls_wrap.cc but nothing seems to stand out. How
>>>> would I begin this task? If this is not supported, maybe you could consider
>>>> helping me out with this?
>>>>
>>> --
>>> Job board: http://jobs.nodejs.org/
>>> New group rules:
>>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>>> Old group rules:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to nodejs+un...@googlegroups.com.
>>> To post to this group, send email to nod...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/nodejs/eb535162-bfe9-4393-9c56-73c840c0be6c%40googlegroups.com
>>> <https://groups.google.com/d/msgid/nodejs/eb535162-bfe9-4393-9c56-73c840c0be6c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAEv2Vf%2Bhov2L%3DU7_18NTZ2GBZ5BkU_G%3D5ppUvXE%2BqpiAftU3uQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to