]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
params: revert error checking when params are duplicated
authorPauli <ppzgs1@gmail.com>
Fri, 11 Jul 2025 06:03:12 +0000 (16:03 +1000)
committerTomas Mraz <tomas@openssl.org>
Thu, 31 Jul 2025 18:21:25 +0000 (20:21 +0200)
This is to avoid a change of behaviour even though it is a result of user
error.  When params are duplicated, all but the first are ignored and no
error is returned.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27923)

util/perl/OpenSSL/paramnames.pm

index e13deb476f90633d83dae7175273fb5ae10294fe..76efdd1f9435e7234dcce60df6e660d3e2cb0aff 100644 (file)
@@ -657,9 +657,8 @@ sub trie_matched {
     printf "%sreturn 0;\n", $indent2;
     printf "%sr->%s[r->num_%s++] = (OSSL_PARAM *)p;\n", $indent1, $field, $field;
   } else {
-    printf "%sif (ossl_unlikely(r->%s != NULL))\n", $indent1, $field;
-    printf "%sreturn 0;\n", $indent2;
-    printf "%sr->%s = (OSSL_PARAM *)p;\n", $indent1, $field;
+    printf "%sif (ossl_likely(r->%s == NULL))\n", $indent1, $field;
+    printf "%sr->%s = (OSSL_PARAM *)p;\n", $indent2, $field;
   }
 }