3 ms·
Yes. And Yes. But someone should write an async SSL stack.. at some point, right? As an outsider to OpenSSL, it doesn't seem viable to do that kind of refact
by pquerna 16y ago
Yes.
And Yes.
But someone should write an async SSL stack.. at some point, right?
As an outsider to OpenSSL, it doesn't seem viable to do that kind of refactoring, so it seems the only viable place for it to live is a new, risky, terrible for security idea project.
- tptacek 16y agoI don't understand Node's architecture enough to know what the problem with OpenSSL is for you, but OpenSSL works just fine async, as you've noted. I use it in my async ObjC web testing tool, EventMachine has it down to a single "start_tls" call, and presumably Twisted got it working too. I want to be careful not to say you're wrong about OpenSSL for Node.js. But OpenSSL itself pretty much works fine async.
- pquerna 16y agoThe problem is not with Async IO. It has all to do with the various Callbacks. If you want to do async things inside those callbacks, you can't with how OpenSSL is structured today. Twisted, for exmaple lets you set various options: http://twistedmatrix.com/documents/10.1.0/api/twisted.internet.ssl.CertificateOptions.html http://twistedmatrix.com/documents/10.1.0/api/twisted.intern... This makes it so the actual callbacks are just checking variables to make their decisions, but you can't implement a session cache backend for example in twisted, you are pretty much stuck with the built-in openssl one, for a single process.
- tptacek 16y agoI see. All I can tell you is, it sounds like you have a legitimate need, but the solution to that need is insanely risky, and probably not worth it to most Node apps.