mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
wc_PKCS7_KeyWrap(): mark pointers as to const and check for NULL
This commit is contained in:
@@ -6816,13 +6816,13 @@ static int PKCS7_GenerateContentEncryptionKey(wc_PKCS7* pkcs7, word32 len)
|
||||
|
||||
/* wrap CEK (content encryption key) with KEK, returns output size (> 0) on
|
||||
* success, < 0 on error */
|
||||
static int wc_PKCS7_KeyWrap(wc_PKCS7 * pkcs7, byte* cek, word32 cekSz, byte* kek,
|
||||
word32 kekSz, byte* out, word32 outSz,
|
||||
static int wc_PKCS7_KeyWrap(wc_PKCS7 const * pkcs7, byte const * cek,
|
||||
word32 cekSz, byte const * kek, word32 kekSz, byte * out, word32 outSz,
|
||||
int keyWrapAlgo, int direction)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (cek == NULL || kek == NULL || out == NULL)
|
||||
if (pkcs7 == NULL || cek == NULL || kek == NULL || out == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
switch (keyWrapAlgo) {
|
||||
|
Reference in New Issue
Block a user