init hardware acc. use of public RSA key with public key decode functions

This commit is contained in:
Jacob Barthelmeh
2017-09-14 17:07:19 -06:00
parent afcef7d394
commit f97f9a6158

View File

@@ -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 */