Skip to content

Commit 03b94b4

Browse files
committed
Add ret_size checking in server keystore
1 parent 18c46af commit 03b94b4

6 files changed

Lines changed: 697 additions & 203 deletions

File tree

benchmark/bench_modules/wh_bench_mod_mldsa.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,8 @@ static int _benchMlDsaSign(whClientContext* client, whBenchOpContext* ctx,
714714

715715
/* Time only the sign operation */
716716
benchStartRet = wh_Bench_StartOp(ctx, id);
717-
ret = wc_MlDsaKey_Sign(&key, sig, &localSigSz, msg, sizeof(msg), rng);
717+
ret = wc_MlDsaKey_SignCtx(&key, NULL, 0, sig, &localSigSz, msg,
718+
sizeof(msg), rng);
718719
benchStopRet = wh_Bench_StopOp(ctx, id);
719720

720721
if (benchStartRet != 0) {
@@ -844,8 +845,9 @@ static int _benchMlDsaVerify(whClientContext* client, whBenchOpContext* ctx,
844845

845846
/* Time only the verify operation */
846847
benchStartRet = wh_Bench_StartOp(ctx, id);
847-
ret = wc_MlDsaKey_Verify(&key, ml_dsa_44_sig, sizeof(ml_dsa_44_sig),
848-
test_msg, sizeof(test_msg), &verified);
848+
ret = wc_MlDsaKey_VerifyCtx(&key, ml_dsa_44_sig,
849+
sizeof(ml_dsa_44_sig), NULL, 0, test_msg,
850+
sizeof(test_msg), &verified);
849851
benchStopRet = wh_Bench_StopOp(ctx, id);
850852

851853
if (benchStartRet != 0) {

0 commit comments

Comments
 (0)