]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
params: add support for 'hidden' parameters
authorPauli <ppzgs1@gmail.com>
Thu, 3 Jul 2025 03:08:27 +0000 (13:08 +1000)
committerTomas Mraz <tomas@openssl.org>
Thu, 31 Jul 2025 18:21:25 +0000 (20:21 +0200)
These are in the name decoder and structure but do not appear in the parameter
listing.

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 5395e5db7cf7dd3f42f72cf64e29920d4326d9ec..b2290e557ee919bdc413546f783acfedee494529 100644 (file)
@@ -794,12 +794,21 @@ sub output_param_decoder {
         my $ptype = $params[$i][2];
         my $pnum = $params[$i][3];
 
-        print "    OSSL_PARAM_$ptype(OSSL_$pname, NULL";
-        print ", 0" if $ptype eq "octet_string" || $ptype eq "octet_ptr"
-                       || $ptype eq "utf8_string" || $ptype eq "utf8_ptr";
-        printf "),\n";
-
         $prms{$pname} = $pident;
+
+        if (defined $pnum && $pnum eq 'hidden') {
+            # Don't output the list entry for hidden items.
+            # Otherwise treat them as scalars, by deleting the count entry.
+            # Hidden arrays will not be supported until necessary.
+            undef $pnum;
+            $params[$i][3] = undef;
+        } else {
+            print "    OSSL_PARAM_$ptype(OSSL_$pname, NULL";
+            print ", 0" if $ptype eq "octet_string" || $ptype eq "octet_ptr"
+                           || $ptype eq "utf8_string" || $ptype eq "utf8_ptr";
+            printf "),\n";
+        }
+
         $concat_num{$pident} = $pnum if defined($pnum);
     }
     print "    OSSL_PARAM_END\n};\n#endif\n\n";