diff options
| author | tb <> | 2023-10-12 17:14:17 +0000 |
|---|---|---|
| committer | tb <> | 2023-10-12 17:14:17 +0000 |
| commit | be20182e8759ec6c1cb5810c35d9b3928c930e71 (patch) | |
| tree | db15091f1011538f519a41c4b074022335a79ee4 /src | |
| parent | 801cf8bd76055acde2228ea441a6e0453ae69726 (diff) | |
| download | openbsd-be20182e8759ec6c1cb5810c35d9b3928c930e71.tar.gz openbsd-be20182e8759ec6c1cb5810c35d9b3928c930e71.tar.bz2 openbsd-be20182e8759ec6c1cb5810c35d9b3928c930e71.zip | |
x509_algor: fix error message
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/asn1/x509_algor.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/regress/lib/libcrypto/asn1/x509_algor.c b/src/regress/lib/libcrypto/asn1/x509_algor.c index 1c8705ace9..8d94e5998e 100644 --- a/src/regress/lib/libcrypto/asn1/x509_algor.c +++ b/src/regress/lib/libcrypto/asn1/x509_algor.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_algor.c,v 1.4 2023/10/12 04:53:45 tb Exp $ */ | 1 | /* $OpenBSD: x509_algor.c,v 1.5 2023/10/12 17:14:17 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> |
| 4 | * | 4 | * |
| @@ -193,32 +193,32 @@ x509_algor_set0_test(void) | |||
| 193 | 193 | ||
| 194 | if ((ret = X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)) != 1) { | 194 | if ((ret = X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)) != 1) { |
| 195 | fprintf(stderr, "Fail: %s: " | 195 | fprintf(stderr, "Fail: %s: " |
| 196 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, anull)" | 196 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)" |
| 197 | ", want: %d, got %d\n", __func__, 1, ret); | 197 | ", want: %d, got %d\n", __func__, 1, ret); |
| 198 | goto failure; | 198 | goto failure; |
| 199 | } | 199 | } |
| 200 | aint = NULL; | 200 | aint = NULL; |
| 201 | if (alg->algorithm != oid) { | 201 | if (alg->algorithm != oid) { |
| 202 | fprintf(stderr, "FAIL: %s: unexpected oid on alg after " | 202 | fprintf(stderr, "FAIL: %s: unexpected oid on alg after " |
| 203 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, anull)" | 203 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)" |
| 204 | ", want: %d, got %d\n", __func__, 1, ret); | 204 | ", want: %d, got %d\n", __func__, 1, ret); |
| 205 | goto failure; | 205 | goto failure; |
| 206 | } | 206 | } |
| 207 | if (alg->parameter == NULL) { | 207 | if (alg->parameter == NULL) { |
| 208 | fprintf(stderr, "FAIL: %s: expected non-NULL parameter after " | 208 | fprintf(stderr, "FAIL: %s: expected non-NULL parameter after " |
| 209 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, anull)" | 209 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)" |
| 210 | ", want: %d, got %d\n", __func__, 1, ret); | 210 | ", want: %d, got %d\n", __func__, 1, ret); |
| 211 | goto failure; | 211 | goto failure; |
| 212 | } | 212 | } |
| 213 | if (alg->parameter->type != V_ASN1_INTEGER) { | 213 | if (alg->parameter->type != V_ASN1_INTEGER) { |
| 214 | fprintf(stderr, "FAIL: %s: want %d parameter type after " | 214 | fprintf(stderr, "FAIL: %s: want %d parameter type after " |
| 215 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, anull), got %d\n", | 215 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint), got %d\n", |
| 216 | __func__, V_ASN1_INTEGER, alg->parameter->type); | 216 | __func__, V_ASN1_INTEGER, alg->parameter->type); |
| 217 | goto failure; | 217 | goto failure; |
| 218 | } | 218 | } |
| 219 | if (alg->parameter->value.asn1_string != aint_ref) { | 219 | if (alg->parameter->value.asn1_string != aint_ref) { |
| 220 | fprintf(stderr, "FAIL: %s: unexpected parameter value after " | 220 | fprintf(stderr, "FAIL: %s: unexpected parameter value after " |
| 221 | "X509_ALGOR_set0(alg, oid, V_ASN1_NULL, anull)\n", __func__); | 221 | "X509_ALGOR_set0(alg, oid, V_ASN1_NULL, aint)\n", __func__); |
| 222 | goto failure; | 222 | goto failure; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| @@ -267,7 +267,7 @@ x509_algor_get0_test(void) | |||
| 267 | 267 | ||
| 268 | if ((ret = X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)) != 1) { | 268 | if ((ret = X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)) != 1) { |
| 269 | fprintf(stderr, "Fail: %s: " | 269 | fprintf(stderr, "Fail: %s: " |
| 270 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, anull)" | 270 | "X509_ALGOR_set0(alg, oid, V_ASN1_INTEGER, aint)" |
| 271 | ", want: %d, got %d\n", __func__, 1, ret); | 271 | ", want: %d, got %d\n", __func__, 1, ret); |
| 272 | goto failure; | 272 | goto failure; |
| 273 | } | 273 | } |
