mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-09 20:20:49 +02:00
TA100: follow-up changes (squash after 4e64cb56)
This commit is contained in:
committed by
Daniele Lacamera
parent
00cca3e25b
commit
dbf4aaa5be
+15
-1
@@ -445,6 +445,10 @@ static const byte const_byte_array[] = "A+Gd\0\0\0";
|
||||
#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#endif
|
||||
#if defined(WOLFSSL_MICROCHIP_TA100)
|
||||
#include <wolfssl/wolfcrypt/port/atmel/atmel.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_CAAM
|
||||
#include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
|
||||
#endif
|
||||
@@ -26747,7 +26751,17 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
|
||||
ret = wc_AsyncWait(ret, &key->asyncDev, WC_ASYNC_FLAG_CALL_AGAIN);
|
||||
#endif
|
||||
if (ret >= 0) {
|
||||
ret = wc_RsaPublicEncrypt(in, inLen, out, outSz, key, &rng);
|
||||
#if defined(WOLFSSL_KEY_GEN) && defined(WOLFSSL_MICROCHIP_TA100)
|
||||
/* Create new keys for TA100 */
|
||||
ret = wc_MakeRsaKey(key, 2048, WC_RSA_EXPONENT, &rng);
|
||||
if (ret) {
|
||||
goto exit_rsa;
|
||||
}
|
||||
ret = wc_RsaPublicEncrypt(in, inLen, out, 256, key, &rng);
|
||||
#else
|
||||
ret = wc_RsaPublicEncrypt(in, inLen, out, outSz, key, &rng);
|
||||
|
||||
#endif
|
||||
}
|
||||
} while (ret == WC_NO_ERR_TRACE(WC_PENDING_E));
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user