diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-11-16 05:13:06 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-11-16 05:13:06 +0000 |
commit | 26597a785ec2dd4e9ec9fb7d9765d2ee8779ee16 (patch) | |
tree | c2c5602397e9381b1cb04472ed057edd4a00e520 /src/tls/s6-tlsd-io.c | |
parent | d8ca717da164c3e76ebb56c954d0a08544955601 (diff) | |
download | s6-networking-26597a785ec2dd4e9ec9fb7d9765d2ee8779ee16.tar.xz |
Add -J and -j to the TLS tools to check for peer close_notify.
Also, and more importantly, significantly rewrite stls_run()
for better full-duplex support. This implementation isn't fully
tested yet.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tls/s6-tlsd-io.c')
-rw-r--r-- | src/tls/s6-tlsd-io.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tls/s6-tlsd-io.c b/src/tls/s6-tlsd-io.c index fac2164..08eee77 100644 --- a/src/tls/s6-tlsd-io.c +++ b/src/tls/s6-tlsd-io.c @@ -13,7 +13,7 @@ #include <s6-networking/config.h> -#define USAGE "s6-tlsd-io [ -v verbosity ] [ -d notif ] [ -S | -s ] [ -Y | -y ] [ -K timeout ] [ -k snilevel ] fdr fdw" +#define USAGE "s6-tlsd-io [ -v verbosity ] [ -d notif ] [ -S | -s ] [ -J | -j ] [ -Y | -y ] [ -K timeout ] [ -k snilevel ] fdr fdw" #define dieusage() strerr_dieusage(100, USAGE) static inline void doit (int *, tain const *tto, uint32_t, uint32_t, unsigned int, unsigned int) gccattr_noreturn ; @@ -78,7 +78,7 @@ int main (int argc, char const *const *argv) unsigned int t = 0 ; for (;;) { - int opt = subgetopt_r(argc, argv, "d:SsYyv:K:k:", &l) ; + int opt = subgetopt_r(argc, argv, "d:SsJjYyv:K:k:", &l) ; if (opt == -1) break ; switch (opt) { @@ -86,6 +86,8 @@ int main (int argc, char const *const *argv) case 'd' : if (!uint0_scan(l.arg, ¬if)) dieusage() ; break ; case 'S' : options |= 1 ; break ; case 's' : options &= ~1 ; break ; + case 'J' : options |= 2 ; break ; + case 'j' : options &= ~2 ; break ; case 'Y' : preoptions |= 1 ; preoptions &= ~2 ; break ; case 'y' : preoptions |= 3 ; break ; case 'K' : if (!uint0_scan(l.arg, &t)) dieusage() ; break ; |