mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-19 04:22:35 +01:00
fixes #4999 Upstream regression. Cherry-pick fix from https://github.com/nodejs/node/issues/4221
15 lines
452 B
Diff
15 lines
452 B
Diff
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
|
|
index 63d767a..1b4cc1a 100644
|
|
--- a/src/node_crypto.cc
|
|
+++ b/src/node_crypto.cc
|
|
@@ -3556,8 +3556,7 @@ bool Hash::HashInit(const char* hash_type) {
|
|
if (md_ == nullptr)
|
|
return false;
|
|
EVP_MD_CTX_init(&mdctx_);
|
|
- EVP_DigestInit_ex(&mdctx_, md_, nullptr);
|
|
- if (0 != ERR_peek_error()) {
|
|
+ if (EVP_DigestInit_ex(&mdctx_, md_, nullptr) <= 0) {
|
|
return false;
|
|
}
|
|
initialised_ = true;
|