forked from wolfSSL/wolfssl
Fix for scan-build warning about value being stored and not used. Changed the wc_RsaFunction
API to public. Added ability to expose wc_RsaDirect
with new define WC_RSA_DIRECT
.
This commit is contained in:
@ -2802,7 +2802,6 @@ int wc_ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out,
|
|||||||
err = wc_CryptoDev_Ecdh(private_key, public_key, out, outlen);
|
err = wc_CryptoDev_Ecdh(private_key, public_key, out, outlen);
|
||||||
if (err != NOT_COMPILED_IN)
|
if (err != NOT_COMPILED_IN)
|
||||||
return err;
|
return err;
|
||||||
err = 0; /* reset error code and try using software */
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1517,7 +1517,7 @@ static int wc_RsaFunctionAsync(const byte* in, word32 inLen, byte* out,
|
|||||||
}
|
}
|
||||||
#endif /* WOLFSSL_ASYNC_CRYPT && WC_ASYNC_ENABLE_RSA */
|
#endif /* WOLFSSL_ASYNC_CRYPT && WC_ASYNC_ENABLE_RSA */
|
||||||
|
|
||||||
#ifdef WC_RSA_NO_PADDING
|
#if defined(WC_RSA_DIRECT) || defined(WC_RSA_NO_PADDING)
|
||||||
/* Function that does the RSA operation directly with no padding.
|
/* Function that does the RSA operation directly with no padding.
|
||||||
*
|
*
|
||||||
* in buffer to do operation on
|
* in buffer to do operation on
|
||||||
@ -1611,7 +1611,7 @@ int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* WC_RSA_NO_PADDING */
|
#endif /* WC_RSA_DIRECT || WC_RSA_NO_PADDING */
|
||||||
|
|
||||||
|
|
||||||
int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
|
int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
|
||||||
|
@ -152,7 +152,7 @@ WOLFSSL_API int wc_FreeRsaKey(RsaKey* key);
|
|||||||
WOLFSSL_LOCAL int wc_InitRsaHw(RsaKey* key);
|
WOLFSSL_LOCAL int wc_InitRsaHw(RsaKey* key);
|
||||||
#endif /* WOLFSSL_XILINX_CRYPT */
|
#endif /* WOLFSSL_XILINX_CRYPT */
|
||||||
|
|
||||||
WOLFSSL_LOCAL int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
|
WOLFSSL_API int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
|
||||||
word32* outLen, int type, RsaKey* key, WC_RNG* rng);
|
word32* outLen, int type, RsaKey* key, WC_RNG* rng);
|
||||||
|
|
||||||
WOLFSSL_API int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out,
|
WOLFSSL_API int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out,
|
||||||
@ -238,9 +238,13 @@ WOLFSSL_API int wc_RsaPrivateDecrypt_ex(const byte* in, word32 inLen,
|
|||||||
WOLFSSL_API int wc_RsaPrivateDecryptInline_ex(byte* in, word32 inLen,
|
WOLFSSL_API int wc_RsaPrivateDecryptInline_ex(byte* in, word32 inLen,
|
||||||
byte** out, RsaKey* key, int type, enum wc_HashType hash,
|
byte** out, RsaKey* key, int type, enum wc_HashType hash,
|
||||||
int mgf, byte* label, word32 lableSz);
|
int mgf, byte* label, word32 lableSz);
|
||||||
|
#if defined(WC_RSA_DIRECT) || defined(WC_RSA_NO_PADDING)
|
||||||
WOLFSSL_API int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
|
WOLFSSL_API int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
|
||||||
RsaKey* key, int type, WC_RNG* rng);
|
RsaKey* key, int type, WC_RNG* rng);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* HAVE_FIPS*/
|
#endif /* HAVE_FIPS*/
|
||||||
|
|
||||||
WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,
|
WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,
|
||||||
word32*);
|
word32*);
|
||||||
WOLFSSL_API int wc_RsaExportKey(RsaKey* key,
|
WOLFSSL_API int wc_RsaExportKey(RsaKey* key,
|
||||||
|
Reference in New Issue
Block a user