+#ifndef OPENSSL_NO_CMAC
+ if (doit[D_EVP_CMAC]) {
+ if (evp_cmac_cipher != NULL) {
+ const char *cipher_name = OBJ_nid2ln(EVP_CIPHER_type(evp_cmac_cipher));
+ evp_cmac_name = app_malloc(sizeof("CMAC()") + strlen(cipher_name),
+ "CMAC name");
+ sprintf(evp_cmac_name, "CMAC(%s)", cipher_name);
+ names[D_EVP_CMAC] = evp_cmac_name;
+
+ for (i = 0; i < loopargs_len; i++) {
+ loopargs[i].cmac_ctx = CMAC_CTX_new();
+ if (loopargs[i].cmac_ctx == NULL) {
+ BIO_printf(bio_err, "CMAC malloc failure, exiting...");
+ exit(1);
+ }
+ }
+ for (testnum = 0; testnum < size_num; testnum++) {
+ print_message(names[D_EVP_CMAC], save_count, lengths[testnum],
+ seconds.sym);
+ Time_F(START);
+ count = run_benchmark(async_jobs, EVP_CMAC_loop, loopargs);
+ d = Time_F(STOP);
+ print_result(D_EVP_CMAC, testnum, count, d);
+ }
+ for (i = 0; i < loopargs_len; i++)
+ CMAC_CTX_free(loopargs[i].cmac_ctx);
+ }
+ }
+#endif
+