[PATCH] s6-tlsserver: actually pass on -Y to s6-tlsd

From: PJ v M <pjvm742_at_disroot.org>
Date: Tue, 8 Aug 2023 15:20:05 +0000

The -Y flag was being treated as if it means the default of not asking
for a client cert.

Signed-off-by: pjvm <pjvm742_at_disroot.org>

---
Seems like I might be the first to try and really use this option...?
Kind regards from
pjvm
 src/tls/s6-tlsserver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tls/s6-tlsserver.c b/src/tls/s6-tlsserver.c
index e5215f4..a23ad7e 100644
--- a/src/tls/s6-tlsserver.c
+++ b/src/tls/s6-tlsserver.c
_at__at_ -46,7 +46,7 _at__at_ struct options_s
   unsigned int flagp : 1 ;
   unsigned int ruleswhat : 2 ;
   unsigned int flagS : 1 ;
-  unsigned int flagy : 1 ;
+  unsigned int flagy : 2 ;
   unsigned int flagZ : 1 ;
   unsigned int onlyvars : 1 ;
   unsigned int doaccess : 1 ;
_at__at_ -128,8 +128,8 _at__at_ int main (int argc, char const *const *argv)
         case 'x' : o.rules = l.arg ; o.ruleswhat = 2 ; o.doaccess = 1 ; break ;
         case 'S' : o.flagS = 1 ; break ;
         case 's' : o.flagS = 0 ; break ;
-        case 'Y' : o.flagy = 0 ; break ;
-        case 'y' : o.flagy = 1 ; break ;
+        case 'Y' : o.flagy = 1 ; break ;
+        case 'y' : o.flagy = 2 ; break ;
         case 'K' : if (!uint0_scan(l.arg, &o.kimeout)) dieusage() ; break ;
         case 'Z' : o.flagZ = 1 ; break ;
         case 'z' : o.flagZ = 0 ; break ;
_at__at_ -217,7 +217,7 _at__at_ int main (int argc, char const *const *argv)
     if (o.verbosity != 1)
       newargv[m++] = o.verbosity ? "-v2" : "-v0" ;
     if (o.flagS) newargv[m++] = "-S" ;
-    if (o.flagy) newargv[m++] = "-y" ;
+    if (o.flagy) newargv[m++] = o.flagy == 1 ? "-Y" : "-y" ;
     if (o.kimeout)
     {
       newargv[m++] = "-K" ;
-- 
2.41.0
Received on Tue Aug 08 2023 - 17:20:05 CEST

This archive was generated by hypermail 2.4.0 : Tue Aug 08 2023 - 17:15:41 CEST