mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
init hardware acc. use of public RSA key with public key decode functions
This commit is contained in:
@@ -2801,6 +2801,12 @@ int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
|
||||
return ASN_RSA_KEY_E;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_XILINX_CRYPT
|
||||
if (wc_InitRsaHw(key) != 0) {
|
||||
return BAD_STATE_E;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2832,6 +2838,12 @@ int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e,
|
||||
return ASN_GETINT_E;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_XILINX_CRYPT
|
||||
if (wc_InitRsaHw(key) != 0) {
|
||||
return BAD_STATE_E;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_USER_RSA */
|
||||
|
Reference in New Issue
Block a user