summaryrefslogtreecommitdiff
path: root/src/stls
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-12-03 01:05:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-12-03 01:05:40 +0000
commitbdb38fdeb4183371b8ad8669c2821526133c39c8 (patch)
tree668f6b7e4ffc1549578259b19c4dd4d916d7156a /src/stls
parentdb3aa47688fa38d4edd6563ce350577617e71a27 (diff)
downloads6-networking-bdb38fdeb4183371b8ad8669c2821526133c39c8.tar.xz
s6-tls*: small bugfixes. Add documentation.
Diffstat (limited to 'src/stls')
-rw-r--r--src/stls/stls_run.c5
-rw-r--r--src/stls/stls_s6tlsc.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/stls/stls_run.c b/src/stls/stls_run.c
index 848295c..86e0faa 100644
--- a/src/stls/stls_run.c
+++ b/src/stls/stls_run.c
@@ -6,7 +6,6 @@
#include <errno.h>
#include <signal.h>
#include <tls.h>
-#include <skalibs/uint32.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/error.h>
#include <skalibs/buffer.h>
@@ -116,7 +115,7 @@ static void closeit (struct tls *ctx, int *fds, int brutal)
fd_close(fds[3]) ; fds[3] = -1 ;
}
-int stls_run (struct tls *ctx, int *fds, unsigned int verbosity, uint32 options, tain_t const *tto)
+int stls_run (struct tls *ctx, int *fds, unsigned int verbosity, uint32_t options, tain_t const *tto)
{
tlsbuf_t b[2] = { { .blockedonother = 0 }, { .blockedonother = 0 } } ;
iopause_fd x[4] ;
@@ -138,7 +137,7 @@ int stls_run (struct tls *ctx, int *fds, unsigned int verbosity, uint32 options,
unsigned int xlen = 0 ;
register int r ;
- tain_add_g(&deadline, fds[0] >= 0 && fds[1] >= 0 && buffer_isempty(&b[0].b) && buffer_isempty(&b[1].b) ? tto : &tain_infinite_relative) ;
+ tain_add_g(&deadline, fds[0] >= 0 && fds[2] >= 0 && buffer_isempty(&b[0].b) && buffer_isempty(&b[1].b) ? tto : &tain_infinite_relative) ;
/* poll() preparation */
diff --git a/src/stls/stls_s6tlsc.c b/src/stls/stls_s6tlsc.c
index 70e8f20..bafc2b8 100644
--- a/src/stls/stls_s6tlsc.c
+++ b/src/stls/stls_s6tlsc.c
@@ -75,7 +75,7 @@ int stls_s6tlsc (char const *const *argv, char const *const *envp, tain_t const
diecfg(cfg, "tls_config_set_ecdhecurve") ;
tls_config_verify(cfg) ;
- tls_config_set_protocols(cfg, TLS_PROTOCOLS_DEFAULT) ;
+ tls_config_set_protocols(cfg, TLS_PROTOCOLS_ALL) ;
tls_config_prefer_ciphers_server(cfg) ;
if (!servername) tls_config_insecure_noverifyname(cfg) ;