mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
SiLabs: simplify init
This commit is contained in:
@ -245,8 +245,7 @@ int silabs_ecc_sig_to_rs(ecc_key* key, word32 keySz)
|
||||
key->key.size = keySz;
|
||||
key->key.storage.method = SL_SE_KEY_STORAGE_EXTERNAL_PLAINTEXT;
|
||||
key->key.flags = SL_SE_KEY_FLAG_ASYMMETRIC_BUFFER_HAS_PUBLIC_KEY
|
||||
| SL_SE_KEY_FLAG_ASYMMMETRIC_SIGNING_ONLY
|
||||
;
|
||||
| SL_SE_KEY_FLAG_ASYMMMETRIC_SIGNING_ONLY;
|
||||
|
||||
sl_stat = sl_se_get_storage_size(&key->key, &key->key.storage.location.buffer.size);
|
||||
key->key.storage.location.buffer.pointer = key->key_raw;
|
||||
|
@ -87,11 +87,8 @@ int wc_silabs_se_hash_init (wc_silabs_sha_t* sha, enum wc_HashType type)
|
||||
break;
|
||||
}
|
||||
|
||||
if (rr == SL_STATUS_OK) {
|
||||
/* init handles if it is already initialized */
|
||||
ret = sl_se_init();
|
||||
} else {
|
||||
ret = BUFFER_E;
|
||||
if (rr != SL_STATUS_OK) {
|
||||
ret = WC_HW_E;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -216,6 +216,11 @@ int wolfCrypt_Init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SILABS_SE_ACCEL
|
||||
/* init handles if it is already initialized */
|
||||
ret = sl_se_init();
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
WOLFSSL_MSG("Using ARM hardware acceleration");
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user