diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-04-18 12:52:34 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-04-18 12:52:34 +0000 |
| commit | 49a26b0671b3fbe932a0a26e9414cce6e8ef3ec2 (patch) | |
| tree | d1a158e29649a319da157491a40f9cfdef329183 /src/tls/s6tls_prep_tlsdio.c | |
| parent | 94f7c378aa7e5f261a3c9e80bfd8a12a264e7ec6 (diff) | |
| download | s6-networking-49a26b0671b3fbe932a0a26e9414cce6e8ef3ec2.tar.gz | |
Prepare for 2.8.0.0; convert tls programs to gol, add noverifycert
Diffstat (limited to 'src/tls/s6tls_prep_tlsdio.c')
| -rw-r--r-- | src/tls/s6tls_prep_tlsdio.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/tls/s6tls_prep_tlsdio.c b/src/tls/s6tls_prep_tlsdio.c index 8408010..b459bc1 100644 --- a/src/tls/s6tls_prep_tlsdio.c +++ b/src/tls/s6tls_prep_tlsdio.c @@ -5,7 +5,7 @@ #include <s6-networking/config.h> #include "s6tls-internal.h" -void s6tls_prep_tlsdio (char const **argv, char *buf, int const *p, uint32_t options, unsigned int verbosity, unsigned int kimeout, unsigned int snilevel) +void s6tls_prep_tlsdio (char const **argv, char *buf, int const *p, uint32_t options, unsigned int verbosity, unsigned int kimeout) { size_t m = 0 ; size_t n = 0 ; @@ -25,10 +25,10 @@ void s6tls_prep_tlsdio (char const **argv, char *buf, int const *p, uint32_t opt n += uint_fmt(buf + n, p[5]) ; buf[n++] = 0 ; } - if (options & 4) argv[m++] = "-S" ; - if (options & 8) argv[m++] = "-J" ; - if (options & 1) - argv[m++] = options & 2 ? "-y" : "-Y" ; + if (options & 0x01) argv[m++] = "-S" ; + if (options & 0x02) argv[m++] = "-J" ; + if (options & 0x04) + argv[m++] = options & 0x08 ? "-y" : "-Y" ; if (kimeout) { argv[m++] = "-K" ; @@ -36,13 +36,8 @@ void s6tls_prep_tlsdio (char const **argv, char *buf, int const *p, uint32_t opt n += uint_fmt(buf + n, kimeout) ; buf[n++] = 0 ; } - if (snilevel) - { - argv[m++] = "-k" ; - argv[m++] = buf + n ; - n += uint_fmt(buf + n, snilevel) ; - buf[n++] = 0 ; - } + if (options & 0x20) argv[m++] = "--mandatory-sni" ; + else if (options & 0x10) argv[m++] = "--sni" ; argv[m++] = "--" ; argv[m++] = buf + n ; n += uint_fmt(buf + n, p[0]) ; |
