From 4d05f56dcdf897eace79e28d052665c94131cbf9 Mon Sep 17 00:00:00 2001 From: Roman Shtylman Date: Sun, 20 Nov 2011 18:09:07 -0500 Subject: [PATCH] tls: expose ssl bug workaround constants The internet is filled with servers which have various bugs and other ssl handshake issues. These constants can be used with the Agent secureOptions option to get around such server limitations when performing https requests --- src/node_constants.cc | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/node_constants.cc b/src/node_constants.cc index 6ac24a2c172..1b884b30941 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -921,6 +921,54 @@ void DefineConstants(Handle target) { NODE_DEFINE_CONSTANT(target, SSL_OP_CRYPTOPRO_TLSEXT_BUG); #endif +#ifdef SSL_OP_MICROSOFT_SESS_ID_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_MICROSOFT_SESS_ID_BUG); +#endif + +#ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_CHALLENGE_BUG); +#endif + +#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG); +#endif + +#ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG); +#endif + +#ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER + NODE_DEFINE_CONSTANT(target, SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER); +#endif + +#ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING + NODE_DEFINE_CONSTANT(target, SSL_OP_MSIE_SSLV2_RSA_PADDING); +#endif + +#ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_SSLEAY_080_CLIENT_DH_BUG); +#endif + +#ifdef SSL_OP_TLS_D5_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_TLS_D5_BUG); +#endif + +#ifdef SSL_OP_TLS_BLOCK_PADDING_BUG + NODE_DEFINE_CONSTANT(target, SSL_OP_TLS_BLOCK_PADDING_BUG); +#endif + +#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS + NODE_DEFINE_CONSTANT(target, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS); +#endif + +#ifdef SSL_OP_ALL + NODE_DEFINE_CONSTANT(target, SSL_OP_ALL); +#endif + +#ifdef SSL_OP_LEGACY_SERVER_CONNECT + NODE_DEFINE_CONSTANT(target, SSL_OP_LEGACY_SERVER_CONNECT); +#endif + #ifdef OPENSSL_NPN_NEGOTIATED #define NPN_ENABLED 1 NODE_DEFINE_CONSTANT(target, NPN_ENABLED);