Skip to content

Instantly share code, notes, and snippets.

@Roguelazer
Created March 17, 2015 22:37
Show Gist options
  • Save Roguelazer/12e001d3ce64da29045c to your computer and use it in GitHub Desktop.
Save Roguelazer/12e001d3ce64da29045c to your computer and use it in GitHub Desktop.
node only tlsext_padding
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 075a2e3..f82ed3f 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -287,6 +287,10 @@ Handle<Value> SecureContext::Init(const Arguments& args) {
sc->ctx_ = SSL_CTX_new(method);
+#ifdef SSL_OP_TLSEXT_PADDING
+ SSL_CTX_set_options(sc->ctx_, SSL_OP_TLSEXT_PADDING);
+#endif
+
// SSL session cache configuration
SSL_CTX_set_session_cache_mode(sc->ctx_,
SSL_SESS_CACHE_SERVER |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment