summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2024-10-02 14:12:21 +0000
committerjsing <>2024-10-02 14:12:21 +0000
commit1b4359e60e8f540ae13ad11b386bab4ea2a6c6e9 (patch)
tree9c0ee1956223e11cbba2c22288756114c6216af1 /src
parent9de203af454d6aa361ffccd10b1fa6cf3179d821 (diff)
downloadopenbsd-1b4359e60e8f540ae13ad11b386bab4ea2a6c6e9.tar.gz
openbsd-1b4359e60e8f540ae13ad11b386bab4ea2a6c6e9.tar.bz2
openbsd-1b4359e60e8f540ae13ad11b386bab4ea2a6c6e9.zip
Enable additional CRYPTO_get_ex_new_index() tests.
It was previously possible to call CRYPTO_get_ex_new_index() with either a negative index or a positive index that equaled or exceeded CRYPTO_EX_INDEX__COUNT. The reimplementation of exdata treats these as error cases.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/exdata/exdata_test.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/regress/lib/libcrypto/exdata/exdata_test.c b/src/regress/lib/libcrypto/exdata/exdata_test.c
index 22483f7061..a82cb4a66c 100644
--- a/src/regress/lib/libcrypto/exdata/exdata_test.c
+++ b/src/regress/lib/libcrypto/exdata/exdata_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: exdata_test.c,v 1.2 2024/03/25 10:41:36 jsing Exp $ */ 1/* $OpenBSD: exdata_test.c,v 1.3 2024/10/02 14:12:21 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -231,8 +231,6 @@ ex_data_test(void)
231 return failed; 231 return failed;
232} 232}
233 233
234#if 0
235/* This insanity currently succeeds... */
236static int 234static int
237ex_new_index_test(void) 235ex_new_index_test(void)
238{ 236{
@@ -257,7 +255,6 @@ ex_new_index_test(void)
257 failure: 255 failure:
258 return failed; 256 return failed;
259} 257}
260#endif
261 258
262int 259int
263main(int argc, char **argv) 260main(int argc, char **argv)
@@ -265,9 +262,7 @@ main(int argc, char **argv)
265 int failed = 0; 262 int failed = 0;
266 263
267 failed |= ex_data_test(); 264 failed |= ex_data_test();
268#if 0
269 failed |= ex_new_index_test(); 265 failed |= ex_new_index_test();
270#endif
271 266
272 /* Force a clean up. */ 267 /* Force a clean up. */
273 CRYPTO_cleanup_all_ex_data(); 268 CRYPTO_cleanup_all_ex_data();