diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-04-18 11:19:23 +0300 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-05-01 17:56:55 +0300 |
commit | 550c2638c0885f9cbb1022f8f5234015e21836fe (patch) | |
tree | 5bc382b6cef0b84dc1851f719a33b7eb975339b6 /src/tls_wrap.h | |
parent | 30b7349176da785cd7294fec8c31cfb9c5f791e8 (diff) |
tls: use `SSL_set_cert_cb` for async SNI/OCSP
Do not enable ClientHello parser for async SNI/OCSP. Use new
OpenSSL-1.0.2's API `SSL_set_cert_cb` to pause the handshake process and
load the cert/OCSP response asynchronously. Hopefuly this will make
whole async SNI/OCSP process much faster and will eventually let us
remove the ClientHello parser itself (which is currently used only for
async session, see #1462 for the discussion of removing it).
NOTE: Ported our code to `SSL_CTX_add1_chain_cert` to use
`SSL_CTX_get0_chain_certs` in `CertCbDone`. Test provided for this
feature.
Fix: https://github.com/iojs/io.js/issues/1423
PR-URL: https://github.com/iojs/io.js/pull/1464
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Diffstat (limited to 'src/tls_wrap.h')
-rw-r--r-- | src/tls_wrap.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/tls_wrap.h b/src/tls_wrap.h index 25088d30261..a3044751908 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -130,7 +130,7 @@ class TLSWrap : public crypto::SSLWrap<TLSWrap>, static void SetVerifyMode(const v8::FunctionCallbackInfo<v8::Value>& args); static void EnableSessionCallbacks( const v8::FunctionCallbackInfo<v8::Value>& args); - static void EnableHelloParser( + static void EnableCertCb( const v8::FunctionCallbackInfo<v8::Value>& args); static void DestroySSL(const v8::FunctionCallbackInfo<v8::Value>& args); @@ -159,10 +159,6 @@ class TLSWrap : public crypto::SSLWrap<TLSWrap>, // If true - delivered EOF to the js-land, either after `close_notify`, or // after the `UV_EOF` on socket. bool eof_; - -#ifdef SSL_CTRL_SET_TLSEXT_SERVERNAME_CB - v8::Persistent<v8::Value> sni_context_; -#endif // SSL_CTRL_SET_TLSEXT_SERVERNAME_CB }; } // namespace node |