forked from wolfSSL/wolfssl
Merge pull request #3586 from tmael/cc310_tests
Fix Cryptocell and revert test.c use of static const
This commit is contained in:
@@ -196,7 +196,7 @@ AC_ARG_ENABLE([linuxkm-defaults],
|
||||
|
||||
if test "$ENABLED_LINUXKM_DEFAULTS" = "yes"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DH_CONST -DWOLFSSL_SP_MOD_WORD_RP -DWOLFSSL_OLD_PRIME_CHECK -DWOLFSSL_SP_DIV_64 -DWOLFSSL_SP_DIV_WORD_HALF"
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DH_CONST -DWOLFSSL_SP_MOD_WORD_RP -DWOLFSSL_OLD_PRIME_CHECK -DWOLFSSL_SP_DIV_64 -DWOLFSSL_SP_DIV_WORD_HALF -DWOLFSSL_SMALL_STACK_STATIC"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([linux-source],
|
||||
|
@@ -4911,16 +4911,15 @@ static int wc_ecc_sign_hash_hw(const byte* in, word32 inlen,
|
||||
return WC_HW_E;
|
||||
}
|
||||
#elif defined(WOLFSSL_CRYPTOCELL)
|
||||
|
||||
/* truncate if hash is longer than key size */
|
||||
if (msgLenInBytes > keysize) {
|
||||
msgLenInBytes = keysize;
|
||||
}
|
||||
hash_mode = cc310_hashModeECC(msgLenInBytes);
|
||||
if (hash_mode == CRYS_ECPKI_HASH_OpModeLast) {
|
||||
hash_mode = cc310_hashModeECC(keysize);
|
||||
hash_mode = CRYS_ECPKI_HASH_SHA256_mode;
|
||||
}
|
||||
|
||||
/* truncate if hash is longer than key size */
|
||||
if (msgLenInBytes > keysize) {
|
||||
msgLenInBytes = keysize;
|
||||
}
|
||||
|
||||
/* create signature from an input buffer using a private key*/
|
||||
@@ -6390,15 +6389,15 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
||||
return err;
|
||||
}
|
||||
|
||||
/* truncate if hash is longer than key size */
|
||||
if (msgLenInBytes > keySz) {
|
||||
msgLenInBytes = keySz;
|
||||
}
|
||||
hash_mode = cc310_hashModeECC(msgLenInBytes);
|
||||
if (hash_mode == CRYS_ECPKI_HASH_OpModeLast) {
|
||||
/* hash_mode = */ cc310_hashModeECC(keySz);
|
||||
hash_mode = CRYS_ECPKI_HASH_SHA256_mode;
|
||||
}
|
||||
/* truncate if hash is longer than key size */
|
||||
if (msgLenInBytes > keySz) {
|
||||
msgLenInBytes = keySz;
|
||||
}
|
||||
|
||||
/* verify the signature using the public key */
|
||||
err = CRYS_ECDSA_Verify(&sigCtxTemp,
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2380,6 +2380,13 @@ extern void uITRON4_free(void *p) ;
|
||||
#undef WOLFSSL_SMALL_STACK
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SMALL_STACK_STATIC
|
||||
#undef WOLFSSL_SMALL_STACK_STATIC
|
||||
#define WOLFSSL_SMALL_STACK_STATIC static
|
||||
#else
|
||||
#define WOLFSSL_SMALL_STACK_STATIC
|
||||
#endif
|
||||
|
||||
/* The client session cache requires time for timeout */
|
||||
#if defined(NO_ASN_TIME) && !defined(NO_SESSION_CACHE)
|
||||
#define NO_SESSION_CACHE
|
||||
|
Reference in New Issue
Block a user