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 6d5dc63

Browse filesBrowse files
codebyteretargos
authored andcommitted
crypto: fix label cast in EVP_PKEY_CTX_set0_rsa_oaep_label
PR-URL: #38926 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 6e93c17 commit 6d5dc63
Copy full SHA for 6d5dc63

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

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

‎src/crypto/crypto_cipher.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_cipher.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ bool PublicKeyCipher::Cipher(
906906
void* label = OPENSSL_memdup(oaep_label.data(), oaep_label.size());
907907
CHECK_NOT_NULL(label);
908908
if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(),
909-
reinterpret_cast<unsigned char*>(label),
909+
static_cast<unsigned char*>(label),
910910
oaep_label.size())) {
911911
OPENSSL_free(label);
912912
return false;
Collapse file

‎src/crypto/crypto_rsa.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_rsa.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ WebCryptoCipherStatus RSA_Cipher(
210210
if (label_len > 0) {
211211
void* label = OPENSSL_memdup(params.label.get(), label_len);
212212
CHECK_NOT_NULL(label);
213-
if (EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label, label_len) <= 0) {
213+
if (EVP_PKEY_CTX_set0_rsa_oaep_label(
214+
ctx.get(),
215+
static_cast<unsigned char*>(label),
216+
label_len) <= 0) {
214217
OPENSSL_free(label);
215218
return WebCryptoCipherStatus::FAILED;
216219
}

0 commit comments

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