From d417579e95dea501ea003a789f6b182a0b8876d4 Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 3 Jul 2025 13:08:27 +1000 Subject: [PATCH] params: add support for 'hidden' parameters These are in the name decoder and structure but do not appear in the parameter listing. Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27923) --- util/perl/OpenSSL/paramnames.pm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/util/perl/OpenSSL/paramnames.pm b/util/perl/OpenSSL/paramnames.pm index 5395e5db7cf..b2290e557ee 100644 --- a/util/perl/OpenSSL/paramnames.pm +++ b/util/perl/OpenSSL/paramnames.pm @@ -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"; -- 2.47.2