From 50987dd3b5034f6426dcbad59ec85073fc6f9c6f Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 4 Jan 2025 21:29:45 +0000 Subject: rsa_method_test: some consistency tweaks --- src/regress/lib/libcrypto/rsa/rsa_method_test.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/rsa/rsa_method_test.c b/src/regress/lib/libcrypto/rsa/rsa_method_test.c index b6faf0c6f1..02189c56ba 100644 --- a/src/regress/lib/libcrypto/rsa/rsa_method_test.c +++ b/src/regress/lib/libcrypto/rsa/rsa_method_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_method_test.c,v 1.2 2025/01/04 18:18:27 tb Exp $ */ +/* $OpenBSD: rsa_method_test.c,v 1.3 2025/01/04 21:29:45 tb Exp $ */ /* * Copyright (c) 2025 Theo Buehler @@ -73,14 +73,14 @@ sign_and_verify(const char *descr, EVP_PKEY *priv, EVP_PKEY *pub) int failed = 1; if ((message = ASN1_IA5STRING_new()) == NULL) - errx(1, "ASN1_IA5STRING_new"); + errx(1, "%s: ASN1_IA5STRING_new", __func__); if (!ASN1_STRING_set(message, msg, sizeof(msg))) - errx(1, "ASN1_STRING_set"); + errx(1, "%s: ASN1_STRING_set", __func__); if ((signature = ASN1_BIT_STRING_new()) == NULL) - errx(1, "ASN1_BIT_STRING_new"); + errx(1, "%s: ASN1_BIT_STRING_new", __func__); if ((x509_alg = X509_ALGOR_new()) == NULL) - errx(1, "X509_ALGOR_new"); + errx(1, "%s: X509_ALGOR_new", __func__); if ((ret = ASN1_item_sign(&ASN1_IA5STRING_it, x509_alg, NULL, signature, message, priv, EVP_sha256())) <= 0) { fprintf(stderr, "FAIL: %s (%s): ASN1_item_sign() returned %d\n", @@ -217,7 +217,6 @@ sign_and_verify_test(void) clear_evp_keys(&evp_priv, &evp_pub); - if (!RSA_set_ex_data(rsa_bogus, ex_index, rsa_pub)) errx(1, "%s: RSA_set_ex_data", __func__); -- cgit v1.2.3-55-g6feb