diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 36ff9fbee..f96722733 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -2819,6 +2819,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; } @@ -2850,6 +2856,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 */