Commit 370954f1bb for openssl.org

commit 370954f1bbdcb9d706db990baccf6f0dcbe5dde7
Author: Weidong Wang <kenazcharisma@gmail.com>
Date:   Tue Mar 24 12:10:28 2026 -0500

    Add test for NULL uri handling in OSSL_STORE_delete()

    Verify that passing NULL as the uri parameter to OSSL_STORE_delete()
    returns 0 rather than crashing with a NULL pointer dereference.

    Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    MergeDate: Thu Apr  2 07:14:09 2026
    (Merged from https://github.com/openssl/openssl/pull/30512)

diff --git a/test/ossl_store_test.c b/test/ossl_store_test.c
index f251313d1a..104ae3ad61 100644
--- a/test/ossl_store_test.c
+++ b/test/ossl_store_test.c
@@ -249,6 +249,12 @@ static int test_store_attach_unregistered_scheme(void)
     return ret;
 }

+static int test_store_delete_null_uri(void)
+{
+    /* Passing NULL uri must return 0, not crash */
+    return TEST_int_eq(OSSL_STORE_delete(NULL, NULL, NULL, NULL, NULL, NULL), 0);
+}
+
 const OPTIONS *test_get_options(void)
 {
     static const OPTIONS test_options[] = {
@@ -303,6 +309,7 @@ int setup_tests(void)
     ADD_TEST(test_store_open_winstore);
 #endif
     ADD_TEST(test_store_search_by_key_fingerprint_fail);
+    ADD_TEST(test_store_delete_null_uri);
     ADD_ALL_TESTS(test_store_get_params, 3);
     if (sm2file != NULL)
         ADD_TEST(test_store_attach_unregistered_scheme);