mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +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.size = keySz;
|
||||||
key->key.storage.method = SL_SE_KEY_STORAGE_EXTERNAL_PLAINTEXT;
|
key->key.storage.method = SL_SE_KEY_STORAGE_EXTERNAL_PLAINTEXT;
|
||||||
key->key.flags = SL_SE_KEY_FLAG_ASYMMETRIC_BUFFER_HAS_PUBLIC_KEY
|
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);
|
sl_stat = sl_se_get_storage_size(&key->key, &key->key.storage.location.buffer.size);
|
||||||
key->key.storage.location.buffer.pointer = key->key_raw;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rr == SL_STATUS_OK) {
|
if (rr != SL_STATUS_OK) {
|
||||||
/* init handles if it is already initialized */
|
ret = WC_HW_E;
|
||||||
ret = sl_se_init();
|
|
||||||
} else {
|
|
||||||
ret = BUFFER_E;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -216,6 +216,11 @@ int wolfCrypt_Init(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SILABS_SE_ACCEL
|
||||||
|
/* init handles if it is already initialized */
|
||||||
|
ret = sl_se_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_ARMASM
|
#ifdef WOLFSSL_ARMASM
|
||||||
WOLFSSL_MSG("Using ARM hardware acceleration");
|
WOLFSSL_MSG("Using ARM hardware acceleration");
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user