@@ -260,6 +260,8 @@ MBED_NOINLINE static int benchmark_md4()
260
260
261
261
BENCHMARK_FUNC_CALL (" MD4" , mbedtls_md4_ret (buf, BUFSIZE, tmp));
262
262
263
+ ret = 0 ;
264
+
263
265
exit:
264
266
265
267
return ret;
@@ -273,6 +275,8 @@ MBED_NOINLINE static int benchmark_md5()
273
275
274
276
BENCHMARK_FUNC_CALL (" MD5" , mbedtls_md5_ret (buf, BUFSIZE, tmp));
275
277
278
+ ret = 0 ;
279
+
276
280
exit:
277
281
278
282
return ret;
@@ -286,6 +290,8 @@ MBED_NOINLINE static int benchmark_ripemd160()
286
290
287
291
BENCHMARK_FUNC_CALL (" RIPEMD160" , mbedtls_ripemd160_ret (buf, BUFSIZE, tmp));
288
292
293
+ ret = 0 ;
294
+
289
295
exit:
290
296
291
297
return ret;
@@ -299,6 +305,8 @@ MBED_NOINLINE static int benchmark_sha1()
299
305
300
306
BENCHMARK_FUNC_CALL (" SHA-1" , mbedtls_sha1_ret (buf, BUFSIZE, tmp));
301
307
308
+ ret = 0 ;
309
+
302
310
exit:
303
311
304
312
return ret;
@@ -312,6 +320,8 @@ MBED_NOINLINE static int benchmark_sha256()
312
320
313
321
BENCHMARK_FUNC_CALL (" SHA-256" , mbedtls_sha256_ret (buf, BUFSIZE, tmp, 0 ));
314
322
323
+ ret = 0 ;
324
+
315
325
exit:
316
326
317
327
return ret;
@@ -325,6 +335,8 @@ MBED_NOINLINE static int benchmark_sha512()
325
335
326
336
BENCHMARK_FUNC_CALL (" SHA-512" , mbedtls_sha512_ret (buf, BUFSIZE, tmp, 0 ));
327
337
338
+ ret = 0 ;
339
+
328
340
exit:
329
341
330
342
return ret;
@@ -344,6 +356,8 @@ MBED_NOINLINE static int benchmark_arc4()
344
356
BENCHMARK_FUNC_CALL (" ARC4" ,
345
357
mbedtls_arc4_crypt (&arc4, BUFSIZE, buf, buf));
346
358
359
+ ret = 0 ;
360
+
347
361
exit:
348
362
mbedtls_arc4_free (&arc4);
349
363
@@ -367,6 +381,8 @@ MBED_NOINLINE static int benchmark_des3()
367
381
mbedtls_des3_crypt_cbc (&des3, MBEDTLS_DES_ENCRYPT,
368
382
BUFSIZE, tmp, buf, buf));
369
383
384
+ ret = 0 ;
385
+
370
386
exit:
371
387
mbedtls_des3_free (&des3);
372
388
@@ -390,6 +406,8 @@ MBED_NOINLINE static int benchmark_des()
390
406
mbedtls_des_crypt_cbc (&des, MBEDTLS_DES_ENCRYPT,
391
407
BUFSIZE, tmp, buf, buf));
392
408
409
+ ret = 0 ;
410
+
393
411
exit:
394
412
mbedtls_des_free (&des);
395
413
@@ -418,6 +436,8 @@ MBED_NOINLINE static int benchmark_des3_cmac()
418
436
mbedtls_cipher_cmac (cipher_info, tmp, 192 , buf,
419
437
BUFSIZE, output));
420
438
439
+ ret = 0 ;
440
+
421
441
exit:
422
442
return ret;
423
443
}
@@ -459,6 +479,8 @@ MBED_NOINLINE static int benchmark_aes_cbc()
459
479
tmp, buf, buf));
460
480
}
461
481
482
+ ret = 0 ;
483
+
462
484
exit:
463
485
mbedtls_aes_free (&aes);
464
486
@@ -504,6 +526,8 @@ MBED_NOINLINE static int benchmark_aes_ctr()
504
526
buf));
505
527
}
506
528
529
+ ret = 0 ;
530
+
507
531
exit:
508
532
mbedtls_aes_free (&aes);
509
533
@@ -548,6 +572,8 @@ MBED_NOINLINE static int benchmark_aes_gcm()
548
572
0 , buf, buf, 16 , tmp));
549
573
}
550
574
575
+ ret = 0 ;
576
+
551
577
exit:
552
578
mbedtls_gcm_free (&gcm);
553
579
@@ -591,6 +617,8 @@ MBED_NOINLINE static int benchmark_aes_ccm()
591
617
16 ));
592
618
}
593
619
620
+ ret = 0 ;
621
+
594
622
exit:
595
623
mbedtls_ccm_free (&ccm);
596
624
@@ -638,6 +666,8 @@ MBED_NOINLINE static int benchmark_aes_cmac()
638
666
mbedtls_aes_cmac_prf_128 (tmp, 16 , buf, BUFSIZE,
639
667
output));
640
668
669
+ ret = 0 ;
670
+
641
671
exit:
642
672
643
673
return ret;
@@ -677,6 +707,8 @@ MBED_NOINLINE static int benchmark_camellia()
677
707
BUFSIZE, tmp, buf, buf));
678
708
}
679
709
710
+ ret = 0 ;
711
+
680
712
exit:
681
713
mbedtls_camellia_free (&camellia);
682
714
@@ -723,6 +755,8 @@ MBED_NOINLINE static int benchmark_blowfish()
723
755
tmp, buf, buf));
724
756
}
725
757
758
+ ret = 0 ;
759
+
726
760
exit:
727
761
mbedtls_blowfish_free (blowfish);
728
762
mbedtls_free (blowfish);
@@ -741,6 +775,8 @@ MBED_NOINLINE static int benchmark_havege()
741
775
742
776
BENCHMARK_FUNC_CALL (" HAVEGE" , mbedtls_havege_random (&hs, buf, BUFSIZE));
743
777
778
+ ret = 0 ;
779
+
744
780
exit:
745
781
mbedtls_havege_free (&hs);
746
782
@@ -783,6 +819,8 @@ MBED_NOINLINE static int benchmark_ctr_drbg()
783
819
BENCHMARK_FUNC_CALL (pr_title,
784
820
mbedtls_ctr_drbg_random (&ctr_drbg, buf, BUFSIZE));
785
821
822
+ ret = 0 ;
823
+
786
824
exit:
787
825
mbedtls_ctr_drbg_free (&ctr_drbg);
788
826
@@ -852,6 +890,8 @@ MBED_NOINLINE static int benchmark_hmac_drbg()
852
890
mbedtls_hmac_drbg_random (&hmac_drbg, buf, BUFSIZE));
853
891
#endif /* MBEDTLS_SHA256_C */
854
892
893
+ ret = 0 ;
894
+
855
895
exit:
856
896
mbedtls_hmac_drbg_free (&hmac_drbg);
857
897
0 commit comments