summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-02-04 13:07:02 +0000
committertb <>2024-02-04 13:07:02 +0000
commit40eba5f5fd0fc8e994bc4e41aa0754651f4083c0 (patch)
tree6bf0533723e0a20eeb7f4229b1015e28297c20bb
parentd78431a5a32e7fdfebee212e4be5965a02960850 (diff)
downloadopenbsd-40eba5f5fd0fc8e994bc4e41aa0754651f4083c0.tar.gz
openbsd-40eba5f5fd0fc8e994bc4e41aa0754651f4083c0.tar.bz2
openbsd-40eba5f5fd0fc8e994bc4e41aa0754651f4083c0.zip
Fix asn1_integer_null_data_test()
The failed variable was erroneously initialized to 0, making this test always pass. From Christian Andersen, thanks!
-rw-r--r--src/regress/lib/libcrypto/asn1/asn1basic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1basic.c b/src/regress/lib/libcrypto/asn1/asn1basic.c
index 5bcb9009a2..1a873bf25d 100644
--- a/src/regress/lib/libcrypto/asn1/asn1basic.c
+++ b/src/regress/lib/libcrypto/asn1/asn1basic.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1basic.c,v 1.15 2023/08/15 21:05:44 tb Exp $ */ 1/* $OpenBSD: asn1basic.c,v 1.16 2024/02/04 13:07:02 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -699,7 +699,7 @@ asn1_integer_null_data_test(void)
699 ASN1_INTEGER *aint = NULL; 699 ASN1_INTEGER *aint = NULL;
700 uint8_t *p = NULL, *pp; 700 uint8_t *p = NULL, *pp;
701 int len; 701 int len;
702 int failed = 0; 702 int failed = 1;
703 703
704 if ((aint = ASN1_INTEGER_new()) == NULL) { 704 if ((aint = ASN1_INTEGER_new()) == NULL) {
705 fprintf(stderr, "FAIL: ASN1_INTEGER_new() == NULL\n"); 705 fprintf(stderr, "FAIL: ASN1_INTEGER_new() == NULL\n");