mirror of https://github.com/wolfSSL/wolfssl.git
check on RNG init return with test, and make input const
parent
5adad7d869
commit
8017c816bb
|
@ -51097,11 +51097,11 @@ static int test_wc_PKCS7_signed_enveloped(void)
|
||||||
|
|
||||||
{
|
{
|
||||||
/* arbitrary custom SKID */
|
/* arbitrary custom SKID */
|
||||||
byte customSKID[] = {
|
const byte customSKID[] = {
|
||||||
0x40, 0x25, 0x77, 0x56
|
0x40, 0x25, 0x77, 0x56
|
||||||
};
|
};
|
||||||
|
|
||||||
wc_InitRng(&rng);
|
ExpectIntEQ(wc_InitRng(&rng), 0);
|
||||||
sigSz = FOURK_BUF * 2;
|
sigSz = FOURK_BUF * 2;
|
||||||
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
|
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
|
||||||
if (pkcs7 != NULL) {
|
if (pkcs7 != NULL) {
|
||||||
|
|
|
@ -3443,7 +3443,7 @@ int wc_PKCS7_EncodeSignedData_ex(PKCS7* pkcs7, const byte* hashBuf,
|
||||||
|
|
||||||
/* Sets a custom SKID in PKCS7 struct, used before calling an encode operation
|
/* Sets a custom SKID in PKCS7 struct, used before calling an encode operation
|
||||||
* Returns 0 on success, negative upon error. */
|
* Returns 0 on success, negative upon error. */
|
||||||
int wc_PKCS7_SetCustomSKID(PKCS7* pkcs7, byte* in, word16 inSz)
|
int wc_PKCS7_SetCustomSKID(PKCS7* pkcs7, const byte* in, word16 inSz)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,8 @@ WOLFSSL_API int wc_PKCS7_EncodeData(PKCS7* pkcs7, byte* output,
|
||||||
word32 outputSz);
|
word32 outputSz);
|
||||||
|
|
||||||
/* CMS/PKCS#7 SignedData */
|
/* CMS/PKCS#7 SignedData */
|
||||||
WOLFSSL_API int wc_PKCS7_SetCustomSKID(PKCS7* pkcs7, byte* in, word16 inSz);
|
WOLFSSL_API int wc_PKCS7_SetCustomSKID(PKCS7* pkcs7, const byte* in,
|
||||||
|
word16 inSz);
|
||||||
WOLFSSL_API int wc_PKCS7_SetDetached(PKCS7* pkcs7, word16 flag);
|
WOLFSSL_API int wc_PKCS7_SetDetached(PKCS7* pkcs7, word16 flag);
|
||||||
WOLFSSL_API int wc_PKCS7_NoDefaultSignedAttribs(PKCS7* pkcs7);
|
WOLFSSL_API int wc_PKCS7_NoDefaultSignedAttribs(PKCS7* pkcs7);
|
||||||
WOLFSSL_API int wc_PKCS7_SetDefaultSignedAttribs(PKCS7* pkcs7, word16 flag);
|
WOLFSSL_API int wc_PKCS7_SetDefaultSignedAttribs(PKCS7* pkcs7, word16 flag);
|
||||||
|
|
Loading…
Reference in New Issue