Commit 585842e512 for openssl.org

commit 585842e512d244c85e17a0fdaf2114d40bd87028
Author: Pauli <paul.dale@oracle.com>
Date:   Thu Aug 27 11:13:16 2026 +1000

    test: cover legacy cipher parameter decoders

    Check DES, RC2 and RC5 parameter metadata.

    Assisted-by: ChatGPT:gpt-5.6Sol
    Reviewed-by: Simo Sorce <simo@redhat.com>
    Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
    Merge-date: Thu Sep  3 02:17:03 2026
    Merged-from: https://github.com/openssl/openssl/pull/32536

diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index 3e519ee289..23a587ce16 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -7844,6 +7844,16 @@ static const struct cipher_param_test_st cipher_param_tests[] = {
     { "DES-EDE3-CBC", "provider=default", OSSL_CIPHER_PARAM_RANDOM_KEY,
         OSSL_PARAM_OCTET_STRING, 0, CIPHER_GETTABLE_CTX_PARAMS, 0 },
 #endif
+#ifndef OPENSSL_NO_RC2
+    { "RC2-CBC", "provider=legacy",
+        OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD, OSSL_PARAM_OCTET_STRING, 0,
+        CIPHER_GETTABLE_CTX_PARAMS, 0 },
+#endif
+#ifndef OPENSSL_NO_RC5
+    { "RC5-CBC", "provider=legacy", OSSL_CIPHER_PARAM_ROUNDS,
+        OSSL_PARAM_UNSIGNED_INTEGER, sizeof(unsigned int),
+        CIPHER_GETTABLE_CTX_PARAMS, 0 },
+#endif
 };

 static int test_cipher_param_types(int idx)
@@ -7853,6 +7863,9 @@ static int test_cipher_param_types(int idx)
     EVP_CIPHER *cipher = NULL;
     int ret = 0;

+    if (strcmp(t->properties, "provider=legacy") == 0 && lgcyprov == NULL)
+        return TEST_skip("Test requires legacy provider to be loaded");
+
     cipher = EVP_CIPHER_fetch(testctx, t->cipher, t->properties);
     if (cipher == NULL && t->optional) {
         ERR_clear_error();