summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-05-29 16:49:37 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-05-29 16:49:37 +0000
commit5a55f36fbaa2006f3ece1bca47bb3ee75b3cfe08 (patch)
tree40cf277bfe420540ca717b8d5e3ab7f0344ee44f /regress
parent83a1c534cbd79f1125f7ce1ec2f83714ccc526f4 (diff)
Make it possible for the large OID test to fail
failed was set to 0 at the top of the function, so failure and success were indistinguishable. Move failed = 0 to the end so it can actually fail.
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libcrypto/asn1/asn1object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/lib/libcrypto/asn1/asn1object.c b/regress/lib/libcrypto/asn1/asn1object.c
index 0660f8af7db..e2008777d91 100644
--- a/regress/lib/libcrypto/asn1/asn1object.c
+++ b/regress/lib/libcrypto/asn1/asn1object.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1object.c,v 1.12 2024/05/29 16:47:26 tb Exp $ */
+/* $OpenBSD: asn1object.c,v 1.13 2024/05/29 16:49:36 tb Exp $ */
/*
* Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org>
*
@@ -477,8 +477,6 @@ asn1_object_large_oid_test(void)
int ret;
int failed = 1;
- failed = 0;
-
p = asn1_large_oid_der;
aobj = d2i_ASN1_OBJECT(NULL, &p, sizeof(asn1_large_oid_der));
if (aobj == NULL) {
@@ -499,6 +497,8 @@ asn1_object_large_oid_test(void)
sizeof(asn1_large_oid_der)))
goto failed;
+ failed = 0;
+
failed:
ASN1_OBJECT_free(aobj);
free(der);