Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 761cf2b

Browse filesBrowse files
committed
src: don't check failure with ERR_peek_error()
It's possible there is already an existing error on OpenSSL's error stack that is unrelated to the EVP_DigestInit_ex() operation we just executed. Fixes: #4221 PR-URL: #4731 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent 83d2b77 commit 761cf2b
Copy full SHA for 761cf2b

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,8 +3611,7 @@ bool Hash::HashInit(const char* hash_type) {
36113611
if (md_ == nullptr)
36123612
return false;
36133613
EVP_MD_CTX_init(&mdctx_);
3614-
EVP_DigestInit_ex(&mdctx_, md_, nullptr);
3615-
if (0 != ERR_peek_error()) {
3614+
if (EVP_DigestInit_ex(&mdctx_, md_, nullptr) <= 0) {
36163615
return false;
36173616
}
36183617
initialised_ = true;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.