summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2025-01-04 21:29:45 +0000
committertb <>2025-01-04 21:29:45 +0000
commit50987dd3b5034f6426dcbad59ec85073fc6f9c6f (patch)
tree9cea46b54bf2aa7a2a55aaccc6aedee935b7af90
parent42971e913f4309bcaf65508ac6156636cbfe6baa (diff)
downloadopenbsd-50987dd3b5034f6426dcbad59ec85073fc6f9c6f.tar.gz
openbsd-50987dd3b5034f6426dcbad59ec85073fc6f9c6f.tar.bz2
openbsd-50987dd3b5034f6426dcbad59ec85073fc6f9c6f.zip
rsa_method_test: some consistency tweaks
-rw-r--r--src/regress/lib/libcrypto/rsa/rsa_method_test.c11
1 files changed, 5 insertions, 6 deletions
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 @@
1/* $OpenBSD: rsa_method_test.c,v 1.2 2025/01/04 18:18:27 tb Exp $ */ 1/* $OpenBSD: rsa_method_test.c,v 1.3 2025/01/04 21:29:45 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2025 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2025 Theo Buehler <tb@openbsd.org>
@@ -73,14 +73,14 @@ sign_and_verify(const char *descr, EVP_PKEY *priv, EVP_PKEY *pub)
73 int failed = 1; 73 int failed = 1;
74 74
75 if ((message = ASN1_IA5STRING_new()) == NULL) 75 if ((message = ASN1_IA5STRING_new()) == NULL)
76 errx(1, "ASN1_IA5STRING_new"); 76 errx(1, "%s: ASN1_IA5STRING_new", __func__);
77 if (!ASN1_STRING_set(message, msg, sizeof(msg))) 77 if (!ASN1_STRING_set(message, msg, sizeof(msg)))
78 errx(1, "ASN1_STRING_set"); 78 errx(1, "%s: ASN1_STRING_set", __func__);
79 79
80 if ((signature = ASN1_BIT_STRING_new()) == NULL) 80 if ((signature = ASN1_BIT_STRING_new()) == NULL)
81 errx(1, "ASN1_BIT_STRING_new"); 81 errx(1, "%s: ASN1_BIT_STRING_new", __func__);
82 if ((x509_alg = X509_ALGOR_new()) == NULL) 82 if ((x509_alg = X509_ALGOR_new()) == NULL)
83 errx(1, "X509_ALGOR_new"); 83 errx(1, "%s: X509_ALGOR_new", __func__);
84 if ((ret = ASN1_item_sign(&ASN1_IA5STRING_it, x509_alg, NULL, signature, 84 if ((ret = ASN1_item_sign(&ASN1_IA5STRING_it, x509_alg, NULL, signature,
85 message, priv, EVP_sha256())) <= 0) { 85 message, priv, EVP_sha256())) <= 0) {
86 fprintf(stderr, "FAIL: %s (%s): ASN1_item_sign() returned %d\n", 86 fprintf(stderr, "FAIL: %s (%s): ASN1_item_sign() returned %d\n",
@@ -217,7 +217,6 @@ sign_and_verify_test(void)
217 217
218 clear_evp_keys(&evp_priv, &evp_pub); 218 clear_evp_keys(&evp_priv, &evp_pub);
219 219
220
221 if (!RSA_set_ex_data(rsa_bogus, ex_index, rsa_pub)) 220 if (!RSA_set_ex_data(rsa_bogus, ex_index, rsa_pub))
222 errx(1, "%s: RSA_set_ex_data", __func__); 221 errx(1, "%s: RSA_set_ex_data", __func__);
223 222