Skip to content

Commit

Permalink
crypto: fix label cast in EVP_PKEY_CTX_set0_rsa_oaep_label
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 4, 2021
1 parent e7f941c commit d0e22e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/crypto/crypto_rsa.cc
Expand Up @@ -210,7 +210,10 @@ WebCryptoCipherStatus RSA_Cipher(
if (label_len > 0) {
void* label = OPENSSL_memdup(params.label.get(), label_len);
CHECK_NOT_NULL(label);
if (EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label, label_len) <= 0) {
if (EVP_PKEY_CTX_set0_rsa_oaep_label(
ctx.get(),
reinterpret_cast<unsigned char*>(label),
label_len) <= 0) {
OPENSSL_free(label);
return WebCryptoCipherStatus::FAILED;
}
Expand Down

0 comments on commit d0e22e7

Please sign in to comment.