@@ -4228,15 +4228,17 @@ static int whTestCrypto_MlDsaWolfCrypt(whClientContext* ctx, int devId,
42284228 }
42294229
42304230 /* Sign message */
4231- ret = wc_MlDsaKey_Sign (& key , sig , & sigSz , msg , sizeof (msg ), rng );
4231+ ret = wc_MlDsaKey_SignCtx (& key , NULL , 0 , sig , & sigSz , msg , sizeof (msg ),
4232+ rng );
42324233 if (ret != 0 ) {
42334234 WH_ERROR_PRINT ("Failed to sign with ML DSA: %d\n" , ret );
42344235 wc_MlDsaKey_Free (& key );
42354236 return ret ;
42364237 }
42374238
42384239 /* Verify signature */
4239- ret = wc_MlDsaKey_Verify (& key , sig , sigSz , msg , sizeof (msg ), & verified );
4240+ ret = wc_MlDsaKey_VerifyCtx (& key , sig , sigSz , NULL , 0 , msg , sizeof (msg ),
4241+ & verified );
42404242 if (ret != 0 ) {
42414243 WH_ERROR_PRINT ("Failed to verify ML DSA signature: %d\n" , ret );
42424244 wc_MlDsaKey_Free (& key );
@@ -4250,7 +4252,8 @@ static int whTestCrypto_MlDsaWolfCrypt(whClientContext* ctx, int devId,
42504252 /* Modify signature to ensure verification fails */
42514253 sig [0 ] ^= 1 ;
42524254
4253- ret = wc_MlDsaKey_Verify (& key , sig , sigSz , msg , sizeof (msg ), & verified );
4255+ ret = wc_MlDsaKey_VerifyCtx (& key , sig , sigSz , NULL , 0 , msg ,
4256+ sizeof (msg ), & verified );
42544257 if (ret != 0 ) {
42554258 WH_ERROR_PRINT ("Failed to verify modified ML DSA signature: %d\n" ,
42564259 ret );
@@ -5042,8 +5045,9 @@ int whTestCrypto_MlDsaVerifyOnlyDma(whClientContext* ctx, int devId,
50425045 /* Verify the message signature */
50435046 if (ret == 0 ) {
50445047 int verifyResult ;
5045- ret = wc_MlDsaKey_Verify (key , ml_dsa_44_sig , sizeof (ml_dsa_44_sig ),
5046- test_msg , sizeof (test_msg ), & verifyResult );
5048+ ret = wc_MlDsaKey_VerifyCtx (key , ml_dsa_44_sig , sizeof (ml_dsa_44_sig ),
5049+ NULL , 0 , test_msg , sizeof (test_msg ),
5050+ & verifyResult );
50475051 if (ret != 0 ) {
50485052 WH_ERROR_PRINT ("Signature did not verify\n" );
50495053 }
0 commit comments