Skip to content

Commit 2833a4b

Browse files
committed
ML-DSA Wconversion fixes
1 parent 6a3eb6f commit 2833a4b

2 files changed

Lines changed: 223 additions & 203 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17057,7 +17057,7 @@ int ConfirmSignature(SignatureCtx* sigCtx,
1705717057
goto exit_cs;
1705817058
}
1705917059
if ((ret = wc_dilithium_set_level(sigCtx->key.dilithium,
17060-
level)) < 0) {
17060+
(byte)level)) < 0) {
1706117061
goto exit_cs;
1706217062
}
1706317063
if ((ret = wc_Dilithium_PublicKeyDecode(key, &idx,
@@ -27780,7 +27780,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
2778027780
word32 outSz = sigSz;
2778127781
ret = wc_falcon_sign_msg(buf, sz, sig, &outSz, falconKey, rng);
2778227782
if (ret == 0)
27783-
ret = outSz;
27783+
ret = (int)outSz;
2778427784
}
2778527785
#endif /* HAVE_FALCON */
2778627786

@@ -27793,15 +27793,15 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
2779327793
(dilithiumKey->params->level == WC_ML_DSA_87_DRAFT)) {
2779427794
ret = wc_dilithium_sign_msg(buf, sz, sig, &outSz, dilithiumKey, rng);
2779527795
if (ret == 0)
27796-
ret = outSz;
27796+
ret = (int)outSz;
2779727797
}
2779827798
else
2779927799
#endif
2780027800
{
2780127801
ret = wc_dilithium_sign_ctx_msg(NULL, 0, buf, sz, sig,
2780227802
&outSz, dilithiumKey, rng);
2780327803
if (ret == 0)
27804-
ret = outSz;
27804+
ret = (int)outSz;
2780527805
}
2780627806
}
2780727807
#endif /* HAVE_DILITHIUM && !WOLFSSL_DILITHIUM_NO_SIGN */

0 commit comments

Comments
 (0)