Lines Matching refs:ret

327 	int ret, i;  in test_hash_perf()  local
346 ret = crypto_hmac_init(dev, &ctx, (u8 *)key, key_len); in test_hash_perf()
348 ret = crypto_sha_init(dev, &ctx); in test_hash_perf()
350 if (ret) { in test_hash_perf()
351 printf("crypto_sha_init error ret = %d!\n", ret); in test_hash_perf()
356 ret = crypto_sha_update(dev, (u32 *)data, data_size); in test_hash_perf()
357 if (ret) { in test_hash_perf()
363 ret = crypto_sha_final(dev, &ctx, hash_out); in test_hash_perf()
364 if (ret) { in test_hash_perf()
365 printf("crypto_sha_final error ret = %d!\n", ret); in test_hash_perf()
376 return ret; in test_hash_perf()
386 int ret = 0, i; in test_cipher_perf() local
412 ret = crypto_mac(dev, ctx, plain, data_size, cipher); in test_cipher_perf()
414 ret = crypto_ae(dev, ctx, plain, data_size, in test_cipher_perf()
417 ret = crypto_cipher(dev, ctx, plain, cipher, in test_cipher_perf()
419 if (ret) { in test_cipher_perf()
421 __func__, __LINE__, ret); in test_cipher_perf()
433 return ret; in test_cipher_perf()
443 int ret; in test_hash_result() local
467 ret = crypto_hmac_init(dev, &csha_ctx, in test_hash_result()
470 ret |= crypto_hmac_update(dev, (void *)test_data->data, in test_hash_result()
472 ret |= crypto_hmac_final(dev, &csha_ctx, out); in test_hash_result()
473 if (ret) { in test_hash_result()
474 printf("hmac calc error ret = %d\n", ret); in test_hash_result()
478 ret = crypto_sha_init(dev, &csha_ctx); in test_hash_result()
479 ret |= crypto_sha_update(dev, (void *)test_data->data, in test_hash_result()
481 ret |= crypto_sha_final(dev, &csha_ctx, out); in test_hash_result()
482 if (ret) { in test_hash_result()
483 printf("hash calc error ret = %d\n", ret); in test_hash_result()
502 return ret; in test_hash_result()
511 int ret; in test_cipher_result() local
546 ret = crypto_mac(dev, &ctx, test_data->plain, in test_cipher_result()
549 ret = crypto_ae(dev, &ctx, in test_cipher_result()
554 ret = crypto_cipher(dev, &ctx, test_data->plain, in test_cipher_result()
556 if (ret) in test_cipher_result()
573 ret = crypto_cipher(dev, &ctx, test_data->cipher, in test_cipher_result()
575 if (ret) in test_cipher_result()
589 test_data->algo_name, test_data->mode_name, ret); in test_cipher_result()
590 return ret; in test_cipher_result()
601 int ret, i; in test_rsa_result() local
642 ret = crypto_rsa_verify(dev, &rsa_key, in test_rsa_result()
644 if (ret) { in test_rsa_result()
645 printf("sign test error, ret = %d\n", ret); in test_rsa_result()
665 ret = crypto_rsa_verify(dev, &rsa_key, in test_rsa_result()
667 if (ret) { in test_rsa_result()
668 printf("verify test error, ret = %d\n", ret); in test_rsa_result()
689 return ret; in test_rsa_result()
698 int ret, i; in test_ec_result() local
722 ret = crypto_ec_verify(dev, &ec_key, in test_ec_result()
726 if (ret) { in test_ec_result()
727 printf("verify test error, ret = %d\n", ret); in test_ec_result()
741 return ret; in test_ec_result()
746 int ret = 0; in test_all_result() local
748 ret = test_hash_result(); in test_all_result()
749 if (ret) in test_all_result()
752 ret = test_cipher_result(); in test_all_result()
753 if (ret) in test_all_result()
756 ret = test_rsa_result(); in test_all_result()
757 if (ret) in test_all_result()
760 ret = test_ec_result(); in test_all_result()
761 if (ret) in test_all_result()