Commit f3d9ae97 authored by Jérémy Lal's avatar Jérémy Lal

Fix openssl patches

parent b78935dc
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -3623,11 +3623,13 @@
if (is_gcm_mode &&
!EVP_CIPHER_CTX_ctrl(ctx_, EVP_CTRL_GCM_SET_IVLEN, iv_len, nullptr)) {
EVP_CIPHER_CTX_free(ctx_);
+ ctx_ = nullptr;
return env()->ThrowError("Invalid IV length");
}
if (!EVP_CIPHER_CTX_set_key_length(ctx_, key_len)) {
EVP_CIPHER_CTX_free(ctx_);
+ ctx_ = nullptr;
return env()->ThrowError("Invalid key length");
}
@@ -3912,7 +3914,6 @@
void Hmac::HmacInit(const char* hash_type, const char* key, int key_len) {
HandleScope scope(env()->isolate());
- CHECK_EQ(initialised_, false);
const EVP_MD* md = EVP_get_digestbyname(hash_type);
if (md == nullptr) {
return env()->ThrowError("Unknown message digest");
@@ -4060,7 +4061,6 @@
bool Hash::HashInit(const char* hash_type) {
- CHECK_EQ(initialised_, false);
const EVP_MD* md = EVP_get_digestbyname(hash_type);
if (md == nullptr)
return false;
@@ -4092,9 +4092,6 @@
THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER(args[0], "Data");
- if (!hash->initialised_) {
- return env->ThrowError("Not initialized");
- }
if (hash->finalized_) {
return env->ThrowError("Digest already called");
}
@@ -4124,9 +4121,6 @@
Hash* hash;
ASSIGN_OR_RETURN_UNWRAP(&hash, args.Holder());
- if (!hash->initialised_) {
- return env->ThrowError("Not initialized");
- }
if (hash->finalized_) {
return env->ThrowError("Digest already called");
}
......@@ -33,3 +33,4 @@ shared_can_build_without_gyp.patch
test_ci_buildd.patch
doctool-yaml.patch
6a9b3087bbfaee37a56b175e142a98c82ec61959.patch
openssl/fixups.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment