summaryrefslogtreecommitdiff
path: root/src/tls
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls')
-rw-r--r--src/tls/s6-tlsclient.c9
-rw-r--r--src/tls/s6-tlsserver.c9
2 files changed, 12 insertions, 6 deletions
diff --git a/src/tls/s6-tlsclient.c b/src/tls/s6-tlsclient.c
index 888c11a..da84aa8 100644
--- a/src/tls/s6-tlsclient.c
+++ b/src/tls/s6-tlsclient.c
@@ -12,7 +12,7 @@
#include <s6-networking/config.h>
#define USAGE "s6-tlsclient [ options ] host port prog...\n" \
-"s6-tcpclient options: [ -q | -Q | -v ] [ -4 | -6 ] [ -d | -D ] [ -r | -R ] [ -h | -H ] [ -n | -N ] [ -t timeout ] [ -l localname ] [ -T timeoutconn ] [ -i localip ] [ -p localport ]\n" \
+"s6-tcpclient options: [ -q | -Q | -v ] [ -4 | -6 ] [ -d | -D ] [ -r | -R ] [ -h ] [ -H ] [ -n | -N ] [ -t timeout ] [ -l localname ] [ -T timeoutconn ] [ -i localip ] [ -p localport ]\n" \
"s6-tlsc options: [ -S | -s ] [ -J | -j ] [ -Y | -y ] [ -K timeout ] [ -k servername ] [ -Z | -z ]"
#define dieusage() strerr_dieusage(100, USAGE)
@@ -33,6 +33,7 @@ struct options_s
unsigned int flag6 : 1 ;
unsigned int flagD : 1 ;
unsigned int flagH : 1 ;
+ unsigned int flagh : 1 ;
unsigned int flagr : 1 ;
unsigned int flagN : 1 ;
unsigned int flagS : 1 ;
@@ -57,6 +58,7 @@ struct options_s
.flag6 = 0, \
.flagD = 0, \
.flagH = 0, \
+ .flagh = 0, \
.flagr = 0, \
.flagN = 0, \
.flagS = 0, \
@@ -86,7 +88,7 @@ int main (int argc, char const *const *argv)
case 'D' : o.flagD = 1 ; break ;
case 'd' : o.flagD = 0 ; break ;
case 'H' : o.flagH = 1 ; break ;
- case 'h' : o.flagH = 0 ; break ;
+ case 'h' : o.flagh = 1 ; break ;
case 'R' : o.flagr = 0 ; break ;
case 'r' : o.flagr = 1 ; break ;
case 'n' : o.flagN = 0 ; break ;
@@ -137,13 +139,14 @@ int main (int argc, char const *const *argv)
size_t pos = 0 ;
unsigned int m = 0 ;
char fmt[UINT_FMT * 4 + UINT16_FMT + IP46_FMT] ;
- char const *newargv[32 + argc] ;
+ char const *newargv[33 + argc] ;
newargv[m++] = S6_NETWORKING_BINPREFIX "s6-tcpclient" ;
if (o.verbosity != 1) newargv[m++] = o.verbosity ? "-v" : "-q" ;
if (o.flag4) newargv[m++] = "-4" ;
if (o.flag6) newargv[m++] = "-6" ;
if (o.flagD) newargv[m++] = "-D" ;
if (o.flagH) newargv[m++] = "-H" ;
+ if (o.flagh) newargv[m++] = "-h" ;
if (o.flagr) newargv[m++] = "-r" ;
if (o.flagN) newargv[m++] = "-N" ;
if (o.timeout)
diff --git a/src/tls/s6-tlsserver.c b/src/tls/s6-tlsserver.c
index 0c38600..5f9c7dd 100644
--- a/src/tls/s6-tlsserver.c
+++ b/src/tls/s6-tlsserver.c
@@ -14,7 +14,7 @@
#define USAGE "s6-tlsserver [ options ] ip port prog...\n" \
"s6-tcpserver options: [ -q | -Q | -v ] [ -1 ] [ -c maxconn ] [ -C localmaxconn ] [ -b backlog ] [ -G gidlist ] [ -g gid ] [ -u uid ] [ -U ]\n" \
-"s6-tcpserver-access options: [ -W | -w ] [ -D | -d ] [ -H | -h ] [ -R | -r ] [ -P | -p ] [ -l localname ] [ -B banner ] [ -t timeout ] [ -i rulesdir | -x rulesfile ]\n" \
+"s6-tcpserver-access options: [ -W | -w ] [ -D | -d ] [ -H ] [ -h ] [ -R | -r ] [ -P | -p ] [ -l localname ] [ -B banner ] [ -t timeout ] [ -i rulesdir | -x rulesfile ]\n" \
"s6-tlsd options: [ -S | -s ] [ -J | -j ] [ -Y | -y ] [ -K timeout ] [ -Z | -z ] [ -k snilevel ]"
#define dieusage() strerr_dieusage(100, USAGE)
@@ -41,6 +41,7 @@ struct options_s
unsigned int flagw : 1 ;
unsigned int flagD : 1 ;
unsigned int flagH : 1 ;
+ unsigned int flagh : 1 ;
unsigned int flagr : 1 ;
unsigned int flagp : 1 ;
unsigned int rulesx : 1 ;
@@ -72,6 +73,7 @@ struct options_s
.flagw = 0, \
.flagD = 0, \
.flagH = 0, \
+ .flagh = 0, \
.flagr = 0, \
.flagp = 0, \
.rulesx = 0, \
@@ -111,7 +113,7 @@ int main (int argc, char const *const *argv)
case 'D' : o.flagD = 1 ; break ;
case 'd' : o.flagD = 0 ; break ;
case 'H' : o.flagH = 1 ; break ;
- case 'h' : o.flagH = 0 ; break ;
+ case 'h' : o.flagh = 1 ; break ;
case 'R' : o.flagr = 0 ; break ;
case 'r' : o.flagr = 1 ; break ;
case 'P' : o.flagp = 0 ; break ;
@@ -142,7 +144,7 @@ int main (int argc, char const *const *argv)
size_t pos = 0 ;
unsigned int m = 0 ;
char fmt[UINT_FMT * 6 + UID_FMT + GID_FMT * (NGROUPS_MAX + 1)] ;
- char const *newargv[50 + argc] ;
+ char const *newargv[51 + argc] ;
int doaccess = o.flagw || o.flagD || !o.flagH || o.flagr || o.flagp || o.localname || o.banner || o.timeout || o.rules ;
newargv[m++] = S6_NETWORKING_BINPREFIX "s6-tcpserver" ;
if (o.verbosity != 1)
@@ -187,6 +189,7 @@ int main (int argc, char const *const *argv)
if (o.flagw) newargv[m++] = "-w" ;
if (o.flagD) newargv[m++] = "-D" ;
if (o.flagH) newargv[m++] = "-H" ;
+ if (o.flagh) newargv[m++] = "-h" ;
if (o.flagr) newargv[m++] = "-r" ;
if (o.flagp) newargv[m++] = "-p" ;
if (o.localname)