Commit 2ced6fc8 authored by Jérémy Lal's avatar Jérémy Lal

Refresh patches

parent 45bae7c1
...@@ -39,7 +39,7 @@ Last-Update: 2013-03-16 ...@@ -39,7 +39,7 @@ Last-Update: 2013-03-16
fs.writeFileSync(pkgPath, `exports.string = '${expectedString}';`); fs.writeFileSync(pkgPath, `exports.string = '${expectedString}';`);
--- a/lib/module.js --- a/lib/module.js
+++ b/lib/module.js +++ b/lib/module.js
@@ -630,7 +630,7 @@ @@ -697,7 +697,7 @@
} else { } else {
prefixDir = path.resolve(process.execPath, '..', '..'); prefixDir = path.resolve(process.execPath, '..', '..');
} }
......
...@@ -18,7 +18,7 @@ a bundled (and older) version of libnghttp2 statically linked into ...@@ -18,7 +18,7 @@ a bundled (and older) version of libnghttp2 statically linked into
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -182,6 +182,27 @@ @@ -193,6 +193,27 @@
dest='shared_http_parser_libpath', dest='shared_http_parser_libpath',
help='a directory to search for the shared http_parser DLL') help='a directory to search for the shared http_parser DLL')
...@@ -46,7 +46,7 @@ a bundled (and older) version of libnghttp2 statically linked into ...@@ -46,7 +46,7 @@ a bundled (and older) version of libnghttp2 statically linked into
shared_optgroup.add_option('--shared-libuv', shared_optgroup.add_option('--shared-libuv',
action='store_true', action='store_true',
dest='shared_libuv', dest='shared_libuv',
@@ -1360,6 +1381,7 @@ @@ -1405,6 +1426,7 @@
configure_node(output) configure_node(output)
configure_library('zlib', output) configure_library('zlib', output)
configure_library('http_parser', output) configure_library('http_parser', output)
...@@ -64,7 +64,7 @@ a bundled (and older) version of libnghttp2 statically linked into ...@@ -64,7 +64,7 @@ a bundled (and older) version of libnghttp2 statically linked into
'node_shared_cares%': 'false', 'node_shared_cares%': 'false',
'node_shared_libuv%': 'false', 'node_shared_libuv%': 'false',
'node_use_openssl%': 'true', 'node_use_openssl%': 'true',
@@ -149,8 +150,15 @@ @@ -161,8 +162,15 @@
'type': '<(node_target_type)', 'type': '<(node_target_type)',
'dependencies': [ 'dependencies': [
...@@ -82,28 +82,17 @@ a bundled (and older) version of libnghttp2 statically linked into ...@@ -82,28 +82,17 @@ a bundled (and older) version of libnghttp2 statically linked into
], ],
'includes': [ 'includes': [
@@ -161,8 +169,7 @@ @@ -172,8 +180,7 @@
'include_dirs': [
'src', 'src',
'tools/msvs/genfiles', 'tools/msvs/genfiles',
'deps/uv/src/ares',
- '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h - '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
- 'deps/nghttp2/lib/includes' - 'deps/nghttp2/lib/includes'
+ '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h + '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
], ],
'sources': [ 'sources': [
@@ -275,9 +282,7 @@ @@ -705,6 +712,15 @@
'NODE_PLATFORM="<(OS)"',
'NODE_WANT_INTERNALS=1',
# Warn when using deprecated V8 APIs.
- 'V8_DEPRECATION_WARNINGS=1',
- # We're using the nghttp2 static lib
- 'NGHTTP2_STATICLIB'
+ 'V8_DEPRECATION_WARNINGS=1'
],
},
{
@@ -687,6 +692,15 @@
'deps/http_parser/http_parser.gyp:http_parser' 'deps/http_parser/http_parser.gyp:http_parser'
] ]
}], }],
...@@ -121,7 +110,7 @@ a bundled (and older) version of libnghttp2 statically linked into ...@@ -121,7 +110,7 @@ a bundled (and older) version of libnghttp2 statically linked into
'deps/uv/uv.gyp:libuv' 'deps/uv/uv.gyp:libuv'
--- a/node.gypi --- a/node.gypi
+++ b/node.gypi +++ b/node.gypi
@@ -251,6 +251,10 @@ @@ -252,6 +252,10 @@
'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ], 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
}], }],
......
...@@ -24,7 +24,7 @@ Forwarded: not-needed ...@@ -24,7 +24,7 @@ Forwarded: not-needed
if (added) { if (added) {
--- a/tools/doc/html.js --- a/tools/doc/html.js
+++ b/tools/doc/html.js +++ b/tools/doc/html.js
@@ -434,10 +434,7 @@ @@ -495,10 +495,7 @@
} }
if (tok.type !== 'heading') return; if (tok.type !== 'heading') return;
...@@ -50,30 +50,17 @@ Forwarded: not-needed ...@@ -50,30 +50,17 @@ Forwarded: not-needed
// Sometimes we have two headings with a single // Sometimes we have two headings with a single
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -491,26 +491,12 @@ @@ -560,13 +560,6 @@
# check if ./node is actually set, else use user pre-installed binary
gen-json = tools/doc/generate.js --format=json $< > $@
out/doc/api/%.json: doc/api/%.md
- @[ -e tools/doc/node_modules/js-yaml/package.json ] || \
- [ -e tools/eslint/node_modules/js-yaml/package.json ] || \
- if [ -x $(NODE) ]; then \
- cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
- else \
- cd tools/doc && node ../../$(NPM) install; \
- fi
[ -x $(NODE) ] && $(NODE) $(gen-json) || node $(gen-json)
# check if ./node is actually set, else use user pre-installed binary
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html \
--template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@ --template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@
out/doc/api/%.html: doc/api/%.md
- @[ -e tools/doc/node_modules/js-yaml/package.json ] || \ gen-doc = \
- [ -e tools/doc/node_modules/js-yaml/package.json ] || \
- [ -e tools/eslint/node_modules/js-yaml/package.json ] || \ - [ -e tools/eslint/node_modules/js-yaml/package.json ] || \
- if [ -x $(NODE) ]; then \ - if [ -x $(NODE) ]; then \
- cd tools/doc && ../../$(NODE) ../../$(NPM) install; \ - cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
- else \ - else \
- cd tools/doc && node ../../$(NPM) install; \ - cd tools/doc && node ../../$(NPM) install; \
- fi - fi;\
[ -x $(NODE) ] && $(NODE) $(gen-html) || node $(gen-html) [ -x $(NODE) ] && $(NODE) $(1) || node $(1)
docopen: $(apidocs_html) out/doc/api/%.json: doc/api/%.md
...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/test/parallel/test-crypto.js --- a/test/parallel/test-crypto.js
+++ b/test/parallel/test-crypto.js +++ b/test/parallel/test-crypto.js
@@ -101,12 +101,12 @@ @@ -129,12 +129,12 @@
assert(tlsCiphers.every((value) => noCapitals.test(value))); assert(tlsCiphers.every((value) => noCapitals.test(value)));
validateList(tlsCiphers); validateList(tlsCiphers);
......
...@@ -16,7 +16,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -16,7 +16,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -616,7 +616,6 @@ @@ -667,7 +667,6 @@
x = PEM_read_bio_X509_AUX(in, nullptr, NoPasswordCallback, nullptr); x = PEM_read_bio_X509_AUX(in, nullptr, NoPasswordCallback, nullptr);
if (x == nullptr) { if (x == nullptr) {
...@@ -24,7 +24,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -24,7 +24,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
return 0; return 0;
} }
@@ -627,7 +626,6 @@ @@ -678,7 +677,6 @@
// Read extra certs // Read extra certs
STACK_OF(X509)* extra_certs = sk_X509_new_null(); STACK_OF(X509)* extra_certs = sk_X509_new_null();
if (extra_certs == nullptr) { if (extra_certs == nullptr) {
......
...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -3415,7 +3415,7 @@ @@ -3457,7 +3457,7 @@
} }
#endif // NODE_FIPS_MODE #endif // NODE_FIPS_MODE
...@@ -26,7 +26,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -26,7 +26,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
const EVP_CIPHER* const cipher = EVP_get_cipherbyname(cipher_type); const EVP_CIPHER* const cipher = EVP_get_cipherbyname(cipher_type);
if (cipher == nullptr) { if (cipher == nullptr) {
return env()->ThrowError("Unknown cipher"); return env()->ThrowError("Unknown cipher");
@@ -3433,21 +3433,20 @@ @@ -3475,11 +3475,11 @@
key, key,
iv); iv);
...@@ -34,14 +34,23 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -34,14 +34,23 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
+ ctx_ = EVP_CIPHER_CTX_new(); + ctx_ = EVP_CIPHER_CTX_new();
const bool encrypt = (kind_ == kCipher); const bool encrypt = (kind_ == kCipher);
- EVP_CipherInit_ex(&ctx_, cipher, nullptr, nullptr, nullptr, encrypt); - EVP_CipherInit_ex(&ctx_, cipher, nullptr, nullptr, nullptr, encrypt);
- if (!EVP_CIPHER_CTX_set_key_length(&ctx_, key_len)) {
- EVP_CIPHER_CTX_cleanup(&ctx_);
+ EVP_CipherInit_ex(ctx_, cipher, nullptr, nullptr, nullptr, encrypt); + EVP_CipherInit_ex(ctx_, cipher, nullptr, nullptr, nullptr, encrypt);
+ if (!EVP_CIPHER_CTX_set_key_length(ctx_, key_len)) {
+ EVP_CIPHER_CTX_free(ctx_); - int mode = EVP_CIPHER_CTX_mode(&ctx_);
return env()->ThrowError("Invalid key length"); + int mode = EVP_CIPHER_CTX_mode(ctx_);
if (encrypt && (mode == EVP_CIPH_CTR_MODE || mode == EVP_CIPH_GCM_MODE ||
mode == EVP_CIPH_CCM_MODE)) {
ProcessEmitWarning(env(), "Use Cipheriv for counter mode of %s",
@@ -3487,17 +3487,16 @@
} }
if (mode == EVP_CIPH_WRAP_MODE)
- EVP_CIPHER_CTX_set_flags(&ctx_, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
+ EVP_CIPHER_CTX_set_flags(ctx_, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
- CHECK_EQ(1, EVP_CIPHER_CTX_set_key_length(&ctx_, key_len));
+ CHECK_EQ(1, EVP_CIPHER_CTX_set_key_length(ctx_, key_len));
- EVP_CipherInit_ex(&ctx_, - EVP_CipherInit_ex(&ctx_,
+ EVP_CipherInit_ex(ctx_, + EVP_CipherInit_ex(ctx_,
nullptr, nullptr,
...@@ -53,12 +62,17 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -53,12 +62,17 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
} }
@@ -3489,28 +3488,27 @@ @@ -3540,32 +3539,31 @@
return env()->ThrowError("Invalid IV length"); return env()->ThrowError("Invalid IV length");
} }
- EVP_CIPHER_CTX_init(&ctx_); - EVP_CIPHER_CTX_init(&ctx_);
+ ctx_ = EVP_CIPHER_CTX_new(); + ctx_ = EVP_CIPHER_CTX_new();
if (mode == EVP_CIPH_WRAP_MODE)
- EVP_CIPHER_CTX_set_flags(&ctx_, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
+ EVP_CIPHER_CTX_set_flags(ctx_, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
const bool encrypt = (kind_ == kCipher); const bool encrypt = (kind_ == kCipher);
- EVP_CipherInit_ex(&ctx_, cipher, nullptr, nullptr, nullptr, encrypt); - EVP_CipherInit_ex(&ctx_, cipher, nullptr, nullptr, nullptr, encrypt);
+ EVP_CipherInit_ex(ctx_, cipher, nullptr, nullptr, nullptr, encrypt); + EVP_CipherInit_ex(ctx_, cipher, nullptr, nullptr, nullptr, encrypt);
...@@ -89,7 +103,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -89,7 +103,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
} }
@@ -3538,8 +3536,8 @@ @@ -3593,8 +3591,8 @@
bool CipherBase::IsAuthenticatedMode() const { bool CipherBase::IsAuthenticatedMode() const {
// Check if this cipher operates in an AEAD mode that we support. // Check if this cipher operates in an AEAD mode that we support.
...@@ -100,7 +114,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -100,7 +114,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
int mode = EVP_CIPHER_mode(cipher); int mode = EVP_CIPHER_mode(cipher);
return mode == EVP_CIPH_GCM_MODE; return mode == EVP_CIPH_GCM_MODE;
} }
@@ -3551,7 +3549,7 @@ @@ -3606,7 +3604,7 @@
ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder()); ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder());
// Only callable after Final and if encrypting. // Only callable after Final and if encrypting.
...@@ -109,7 +123,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -109,7 +123,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
cipher->kind_ != kCipher || cipher->kind_ != kCipher ||
cipher->auth_tag_len_ == 0) { cipher->auth_tag_len_ == 0) {
return env->ThrowError("Attempting to get auth tag in unsupported state"); return env->ThrowError("Attempting to get auth tag in unsupported state");
@@ -3572,7 +3570,7 @@ @@ -3627,7 +3625,7 @@
CipherBase* cipher; CipherBase* cipher;
ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder()); ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder());
...@@ -118,7 +132,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -118,7 +132,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
!cipher->IsAuthenticatedMode() || !cipher->IsAuthenticatedMode() ||
cipher->kind_ != kDecipher) { cipher->kind_ != kDecipher) {
return env->ThrowError("Attempting to set auth tag in unsupported state"); return env->ThrowError("Attempting to set auth tag in unsupported state");
@@ -3590,10 +3588,10 @@ @@ -3645,10 +3643,10 @@
bool CipherBase::SetAAD(const char* data, unsigned int len) { bool CipherBase::SetAAD(const char* data, unsigned int len) {
...@@ -131,7 +145,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -131,7 +145,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
nullptr, nullptr,
&outlen, &outlen,
reinterpret_cast<const unsigned char*>(data), reinterpret_cast<const unsigned char*>(data),
@@ -3621,21 +3619,21 @@ @@ -3676,21 +3674,21 @@
int len, int len,
unsigned char** out, unsigned char** out,
int* out_len) { int* out_len) {
...@@ -157,7 +171,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -157,7 +171,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
*out, *out,
out_len, out_len,
reinterpret_cast<const unsigned char*>(data), reinterpret_cast<const unsigned char*>(data),
@@ -3683,9 +3681,9 @@ @@ -3738,9 +3736,9 @@
bool CipherBase::SetAutoPadding(bool auto_padding) { bool CipherBase::SetAutoPadding(bool auto_padding) {
...@@ -169,7 +183,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -169,7 +183,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
} }
@@ -3701,22 +3699,22 @@ @@ -3756,22 +3754,22 @@
bool CipherBase::Final(unsigned char** out, int *out_len) { bool CipherBase::Final(unsigned char** out, int *out_len) {
...@@ -198,7 +212,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -198,7 +212,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
return r == 1; return r == 1;
} }
@@ -3727,7 +3725,7 @@ @@ -3782,7 +3780,7 @@
CipherBase* cipher; CipherBase* cipher;
ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder()); ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder());
...@@ -209,7 +223,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -209,7 +223,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
int out_len = -1; int out_len = -1;
--- a/src/node_crypto.h --- a/src/node_crypto.h
+++ b/src/node_crypto.h +++ b/src/node_crypto.h
@@ -53,8 +53,6 @@ @@ -51,8 +51,6 @@
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/pkcs12.h> #include <openssl/pkcs12.h>
...@@ -218,7 +232,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -218,7 +232,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
#if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_set_tlsext_status_cb) #if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_set_tlsext_status_cb)
# define NODE__HAVE_TLSEXT_STATUS_CB # define NODE__HAVE_TLSEXT_STATUS_CB
#endif // !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_set_tlsext_status_cb) #endif // !defined(OPENSSL_NO_TLSEXT) && defined(SSL_CTX_set_tlsext_status_cb)
@@ -444,9 +442,7 @@ @@ -442,9 +440,7 @@
class CipherBase : public BaseObject { class CipherBase : public BaseObject {
public: public:
~CipherBase() override { ~CipherBase() override {
...@@ -229,7 +243,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -229,7 +243,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
} }
static void Initialize(Environment* env, v8::Local<v8::Object> target); static void Initialize(Environment* env, v8::Local<v8::Object> target);
@@ -485,15 +481,14 @@ @@ -483,15 +479,14 @@
v8::Local<v8::Object> wrap, v8::Local<v8::Object> wrap,
CipherKind kind) CipherKind kind)
: BaseObject(env, wrap), : BaseObject(env, wrap),
......
...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -207,6 +207,9 @@ @@ -205,6 +205,9 @@
CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509); CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
return 1; return 1;
} }
...@@ -25,7 +25,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -25,7 +25,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
#endif // OPENSSL_VERSION_NUMBER < 0x10100000L #endif // OPENSSL_VERSION_NUMBER < 0x10100000L
// Subject DER of CNNIC ROOT CA and CNNIC EV ROOT CA are taken from // Subject DER of CNNIC ROOT CA and CNNIC EV ROOT CA are taken from
@@ -3890,6 +3893,11 @@ @@ -3945,6 +3948,11 @@
} }
...@@ -37,7 +37,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -37,7 +37,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
void Hash::Initialize(Environment* env, v8::Local<v8::Object> target) { void Hash::Initialize(Environment* env, v8::Local<v8::Object> target) {
Local<FunctionTemplate> t = env->NewFunctionTemplate(New); Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
@@ -3924,20 +3932,22 @@ @@ -3979,20 +3987,22 @@
const EVP_MD* md = EVP_get_digestbyname(hash_type); const EVP_MD* md = EVP_get_digestbyname(hash_type);
if (md == nullptr) if (md == nullptr)
return false; return false;
...@@ -65,7 +65,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -65,7 +65,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
return true; return true;
} }
@@ -4002,8 +4012,7 @@ @@ -4057,8 +4067,7 @@
unsigned char md_value[EVP_MAX_MD_SIZE]; unsigned char md_value[EVP_MAX_MD_SIZE];
unsigned int md_len; unsigned int md_len;
...@@ -77,7 +77,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -77,7 +77,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
Local<Value> error; Local<Value> error;
--- a/src/node_crypto.h --- a/src/node_crypto.h
+++ b/src/node_crypto.h +++ b/src/node_crypto.h
@@ -526,11 +526,7 @@ @@ -524,11 +524,7 @@
class Hash : public BaseObject { class Hash : public BaseObject {
public: public:
...@@ -90,7 +90,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -90,7 +90,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
static void Initialize(Environment* env, v8::Local<v8::Object> target); static void Initialize(Environment* env, v8::Local<v8::Object> target);
@@ -544,13 +540,13 @@ @@ -542,13 +538,13 @@
Hash(Environment* env, v8::Local<v8::Object> wrap) Hash(Environment* env, v8::Local<v8::Object> wrap)
: BaseObject(env, wrap), : BaseObject(env, wrap),
......
...@@ -18,7 +18,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -18,7 +18,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/doc/api/deprecations.md --- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md +++ b/doc/api/deprecations.md
@@ -694,3 +694,14 @@ @@ -729,3 +729,14 @@
[alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size [alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size
[from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length [from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length
[from_string_encoding]: buffer.html#buffer_class_method_buffer_from_string_encoding [from_string_encoding]: buffer.html#buffer_class_method_buffer_from_string_encoding
...@@ -35,7 +35,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -35,7 +35,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
+ +
--- a/lib/_tls_common.js --- a/lib/_tls_common.js
+++ b/lib/_tls_common.js +++ b/lib/_tls_common.js
@@ -55,6 +55,16 @@ @@ -54,6 +54,16 @@
exports.SecureContext = SecureContext; exports.SecureContext = SecureContext;
...@@ -52,7 +52,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -52,7 +52,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
exports.createSecureContext = function createSecureContext(options, context) { exports.createSecureContext = function createSecureContext(options, context) {
if (!options) options = {}; if (!options) options = {};
@@ -115,6 +125,8 @@ @@ -114,6 +124,8 @@
c.context.setECDHCurve(tls.DEFAULT_ECDH_CURVE); c.context.setECDHCurve(tls.DEFAULT_ECDH_CURVE);
else if (options.ecdhCurve) else if (options.ecdhCurve)
c.context.setECDHCurve(options.ecdhCurve); c.context.setECDHCurve(options.ecdhCurve);
...@@ -63,7 +63,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -63,7 +63,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
const warning = c.context.setDHParam(options.dhparam); const warning = c.context.setDHParam(options.dhparam);
--- a/test/parallel/test-tls-ecdh-disable.js --- a/test/parallel/test-tls-ecdh-disable.js
+++ b/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js
@@ -27,6 +27,11 @@ @@ -31,6 +31,11 @@
if (!common.opensslCli) if (!common.opensslCli)
common.skip('missing openssl-cli'); common.skip('missing openssl-cli');
...@@ -75,7 +75,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -75,7 +75,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
const assert = require('assert'); const assert = require('assert');
const tls = require('tls'); const tls = require('tls');
const exec = require('child_process').exec; const exec = require('child_process').exec;
@@ -39,6 +44,9 @@ @@ -42,6 +47,9 @@
ecdhCurve: false ecdhCurve: false
}; };
......
...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -4059,6 +4059,14 @@ @@ -4114,6 +4114,14 @@
SignBase::Error SignBase::Init(const char* sign_type) { SignBase::Error SignBase::Init(const char* sign_type) {
CHECK_EQ(mdctx_, nullptr); CHECK_EQ(mdctx_, nullptr);
......
...@@ -19,7 +19,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -19,7 +19,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.h --- a/src/node_crypto.h
+++ b/src/node_crypto.h +++ b/src/node_crypto.h
@@ -108,7 +108,13 @@ @@ -106,7 +106,13 @@
static const int kTicketKeyIVIndex = 4; static const int kTicketKeyIVIndex = 4;
protected: protected:
...@@ -33,7 +33,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -33,7 +33,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
static void New(const v8::FunctionCallbackInfo<v8::Value>& args); static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Init(const v8::FunctionCallbackInfo<v8::Value>& args); static void Init(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -222,11 +228,17 @@ @@ -220,11 +226,17 @@
protected: protected:
typedef void (*CertCb)(void* arg); typedef void (*CertCb)(void* arg);
......
...@@ -44,7 +44,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -44,7 +44,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/doc/api/tls.md --- a/doc/api/tls.md
+++ b/doc/api/tls.md +++ b/doc/api/tls.md
@@ -573,12 +573,12 @@ @@ -558,12 +558,12 @@
added: v0.11.4 added: v0.11.4
--> -->
...@@ -62,7 +62,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -62,7 +62,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -2219,9 +2219,8 @@ @@ -2261,9 +2261,8 @@
Local<Object> info = Object::New(env->isolate()); Local<Object> info = Object::New(env->isolate());
const char* cipher_name = SSL_CIPHER_get_name(c); const char* cipher_name = SSL_CIPHER_get_name(c);
info->Set(env->name_string(), OneByteString(args.GetIsolate(), cipher_name)); info->Set(env->name_string(), OneByteString(args.GetIsolate(), cipher_name));
......
...@@ -31,7 +31,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -31,7 +31,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -2463,20 +2463,12 @@ @@ -2505,20 +2505,12 @@
unsigned alpn_protos_len = Buffer::Length(alpn_buffer); unsigned alpn_protos_len = Buffer::Length(alpn_buffer);
int status = SSL_select_next_proto(const_cast<unsigned char**>(out), outlen, int status = SSL_select_next_proto(const_cast<unsigned char**>(out), outlen,
alpn_protos, alpn_protos_len, in, inlen); alpn_protos, alpn_protos_len, in, inlen);
......
...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -15,7 +15,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -188,6 +188,8 @@ @@ -186,6 +186,8 @@
return 1; return 1;
} }
...@@ -24,7 +24,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -24,7 +24,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
static void SSL_SESSION_get0_ticket(const SSL_SESSION* s, static void SSL_SESSION_get0_ticket(const SSL_SESSION* s,
const unsigned char** tick, size_t* len) { const unsigned char** tick, size_t* len) {
*len = s->tlsext_ticklen; *len = s->tlsext_ticklen;
@@ -496,12 +498,12 @@ @@ -547,12 +549,12 @@
ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder()); ASSIGN_OR_RETURN_UNWRAP(&sc, args.Holder());
Environment* env = sc->env(); Environment* env = sc->env();
...@@ -39,7 +39,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -39,7 +39,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
// are still accepted. They are OpenSSL's way of saying that all known // are still accepted. They are OpenSSL's way of saying that all known
// protocols are supported unless explicitly disabled (which we do below // protocols are supported unless explicitly disabled (which we do below
// for SSLv2 and SSLv3.) // for SSLv2 and SSLv3.)
@@ -549,7 +551,7 @@ @@ -600,7 +602,7 @@
sc->ctx_ = SSL_CTX_new(method); sc->ctx_ = SSL_CTX_new(method);
SSL_CTX_set_app_data(sc->ctx_, sc); SSL_CTX_set_app_data(sc->ctx_, sc);
...@@ -48,7 +48,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -48,7 +48,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
// cipher list contains SSLv2 ciphers (not the default, should be rare.) // cipher list contains SSLv2 ciphers (not the default, should be rare.)
// The bundled OpenSSL doesn't have SSLv2 support but the system OpenSSL may. // The bundled OpenSSL doesn't have SSLv2 support but the system OpenSSL may.
// SSLv3 is disabled because it's susceptible to downgrade attacks (POODLE.) // SSLv3 is disabled because it's susceptible to downgrade attacks (POODLE.)
@@ -5891,7 +5893,7 @@ @@ -5937,7 +5939,7 @@
void GetSSLCiphers(const FunctionCallbackInfo<Value>& args) { void GetSSLCiphers(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args); Environment* env = Environment::GetCurrent(args);
......
...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org> ...@@ -17,7 +17,7 @@ Reviewed-By: Rod Vagg <rod@vagg.org>
--- a/src/node_crypto.cc --- a/src/node_crypto.cc
+++ b/src/node_crypto.cc +++ b/src/node_crypto.cc
@@ -4031,6 +4031,38 @@ @@ -4086,6 +4086,38 @@