mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 04:34:41 +02:00
Fix for wc_GetCTC_HashOID
in FIPS mode. Uses the new wc_HashTypeConvert
to handle conversion from unique WC_ALGO (int
) to WC_HASH_TYPE_ALGO (enum wc_HashType
).
This commit is contained in:
@@ -4898,9 +4898,10 @@ word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz,
|
|||||||
int wc_GetCTC_HashOID(int type)
|
int wc_GetCTC_HashOID(int type)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
enum wc_HashType hType;
|
||||||
|
|
||||||
/* hash type is same as enum HashType (ex WC_SHA is WC_HASH_TYPE_SHA) */
|
hType = wc_HashTypeConvert(type);
|
||||||
ret = wc_HashGetOID((enum wc_HashType)type);
|
ret = wc_HashGetOID(hType);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
ret = 0; /* backwards compatibility */
|
ret = 0; /* backwards compatibility */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user