Skip to content

Commit

Permalink
crypto: cast oaepLabel to unsigned char*
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Dec 12, 2019
1 parent 64ee64d commit e3b6c64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node_crypto.cc
Expand Up @@ -5513,8 +5513,9 @@ bool PublicKeyCipher::Cipher(Environment* env,
// OpenSSL takes ownership of the label, so we need to create a copy.
void* label = OPENSSL_memdup(oaep_label, oaep_label_len);
CHECK_NOT_NULL(label);
if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label,
oaep_label_len)) {
if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(),
reinterpret_cast<unsigned char*>(label),
oaep_label_len)) {
OPENSSL_free(label);
return false;
}
Expand Down

0 comments on commit e3b6c64

Please sign in to comment.