From cb7efe1c3574d9de639eb987da72463be4514841 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 Jun 2026 00:27:22 +0200 Subject: [PATCH] cd2nroff: handle TLS together with other protocols To render CURLOPT_KEYPASSWD properly Closes #22123 --- scripts/cd2nroff | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/cd2nroff b/scripts/cd2nroff index 99c2e8a576..27717cfbe3 100755 --- a/scripts/cd2nroff +++ b/scripts/cd2nroff @@ -100,27 +100,33 @@ sub outprotocols { my (@p) = @_; my $comma = 0; my @o; + my $tls = 0; push @o, ".SH PROTOCOLS\n"; - if($p[0] eq "TLS") { - push @o, "This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc."; - } - else { - my @s = sort @p; - push @o, "This functionality affects "; - for my $e (sort @s) { + my @s = sort @p; + push @o, "This functionality affects "; + for my $e (sort @s) { + if($e eq "TLS") { + $tls = 1; + } + else { push @o, sprintf "%s%s", $comma ? (($e eq $s[-1]) ? " and " : ", "): "", lc($e); $comma = 1; } - if($#s == 0) { - if($s[0] eq "All") { - push @o, " supported protocols"; - } - else { - push @o, " only"; - } + } + if($tls) { + push @o, sprintf + "%sall TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.", + $comma ? " and ": " "; + } + if($#s == 0) { + if($s[0] eq "All") { + push @o, " supported protocols"; + } + else { + push @o, " only"; } } push @o, "\n";