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 e4b3181

Browse filesBrowse files
codebyteretargos
authored andcommitted
crypto: cast oaepLabel to unsigned char*
OpenSSL uses a macro without typechecking; since C++ does not implicitly cast void* this is needed to conform Node.js to the OpenSSL documentation. PR-URL: #30917 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 6f61407 commit e4b3181
Copy full SHA for e4b3181

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5509,8 +5509,9 @@ bool PublicKeyCipher::Cipher(Environment* env,
55095509
// OpenSSL takes ownership of the label, so we need to create a copy.
55105510
void* label = OPENSSL_memdup(oaep_label, oaep_label_len);
55115511
CHECK_NOT_NULL(label);
5512-
if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label,
5513-
oaep_label_len)) {
5512+
if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(),
5513+
reinterpret_cast<unsigned char*>(label),
5514+
oaep_label_len)) {
55145515
OPENSSL_free(label);
55155516
return false;
55165517
}

0 commit comments

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