From 334d807b924427434b42d4fbae745d3d1b38a218 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 10 Jan 2017 02:17:16 +0000 Subject: Types fix, first pass XXX marks what must change when skalibs changes. Also started writing functions for client certificate support in sbearssl, but it's not working yet (need more high-level support from BearSSL before it can work) --- INSTALL | 13 ++++---- doc/index.html | 12 +++---- doc/s6-tlsc.html | 8 ++--- doc/s6-tlsd.html | 14 +++----- doc/upgrade.html | 12 +++++++ package/info | 2 +- src/clock/s6-sntpclock.c | 8 +++-- src/clock/s6-taiclock.c | 7 ++-- src/clock/s6-taiclockd.c | 7 ++-- src/conn-tools/s6-getservbyname.c | 7 ++-- src/conn-tools/s6-ident-client.c | 3 +- src/conn-tools/s6-tcpclient.c | 8 +++-- src/conn-tools/s6-tcpserver-access.c | 8 +++-- src/conn-tools/s6-tcpserver.c | 16 +++++---- src/conn-tools/s6-tcpserver4-socketbinder.c | 3 +- src/conn-tools/s6-tcpserver4.c | 16 +++++---- src/conn-tools/s6-tcpserver4d.c | 31 +++++++++--------- src/conn-tools/s6-tcpserver6.c | 16 +++++---- src/conn-tools/s6-tcpserver6d.c | 17 +++++----- src/conn-tools/s6-tlsc.c | 1 + src/conn-tools/s6-tlsclient.c | 6 ++-- src/conn-tools/s6-tlsd.c | 5 +-- src/conn-tools/s6-tlsserver.c | 2 +- src/include/s6-networking/ident.h | 9 +++--- src/include/s6-networking/sbearssl.h | 4 +++ src/include/s6-networking/stls.h | 1 + src/libs6net/s6net_ident_client.c | 8 ++--- src/libs6net/s6net_ident_reply_get.c | 10 +++--- src/libs6net/s6net_ident_reply_parse.c | 14 ++++---- src/minidentd/mgetuid-default.c | 7 ++-- src/minidentd/mgetuid-linux.c | 28 +++++++++------- src/minidentd/mgetuid.h | 5 +-- src/minidentd/minidentd.c | 28 ++++++++-------- src/sbearssl/deps-lib/sbearssl | 2 ++ src/sbearssl/sbearssl-internal.h | 1 + src/sbearssl/sbearssl_cert_readfile.c | 2 +- src/sbearssl/sbearssl_clean_tls_and_spawn.c | 1 + src/sbearssl/sbearssl_pem_decode_from_buffer.c | 11 ++++--- src/sbearssl/sbearssl_run.c | 1 + src/sbearssl/sbearssl_s6tlsc.c | 1 + src/sbearssl/sbearssl_s6tlsd.c | 45 ++++++++++++++++++++++++-- src/sbearssl/sbearssl_setclientcert.c | 29 +++++++++++++++++ src/sbearssl/sbearssl_skey_readfile.c | 2 +- src/sbearssl/sbearssl_x500_from_ta.c | 19 +++++++++++ src/sbearssl/sbearssl_x500_name_len.c | 15 +++++++++ src/sbearssl/sbearssl_x509_minimal_set_tai.c | 2 +- src/stls/stls-internal.h | 1 + src/stls/stls_clean_tls_and_spawn.c | 1 + src/stls/stls_run.c | 1 + src/stls/stls_s6tlsc.c | 1 + src/stls/stls_s6tlsd.c | 37 ++++++++++++--------- 51 files changed, 337 insertions(+), 171 deletions(-) create mode 100644 src/sbearssl/sbearssl_setclientcert.c create mode 100644 src/sbearssl/sbearssl_x500_from_ta.c create mode 100644 src/sbearssl/sbearssl_x500_name_len.c diff --git a/INSTALL b/INSTALL index 1374056..a99833d 100644 --- a/INSTALL +++ b/INSTALL @@ -6,14 +6,15 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.4.0.2 or later: http://skarnet.org/software/skalibs/ - - execline version 2.2.0.0 or later: http://skarnet.org/software/execline/ - - s6 version 2.4.0.0 or later: http://skarnet.org/software/s6/ - - s6-dns version 2.1.0.0 or later: http://skarnet.org/software/s6-dns/ + - skalibs version 2.5.0.0 or later: http://skarnet.org/software/skalibs/ + - execline version 2.3.0.0 or later: http://skarnet.org/software/execline/ + - s6 version 2.5.0.0 or later: http://skarnet.org/software/s6/ + - s6-dns version 2.2.0.0 or later: http://skarnet.org/software/s6-dns/ - Depending on whether you build the SSL tools, libressl version 2.4.4 or later: http://libressl.org/ - or bearssl version 0.1 or later: http://bearssl.org/ - (BearSSL support is experimental for now, don't use it yet.) + or bearssl version 0.2 or later: http://bearssl.org/ + (BearSSL support is experimental for now, I encourage you to use it + but be aware it's bleeding-edge and APIs may change.) This software will run on any operating system that implements POSIX.1-2008, available at: diff --git a/doc/index.html b/doc/index.html index e19457e..48fed00 100644 --- a/doc/index.html +++ b/doc/index.html @@ -44,22 +44,22 @@ compiled with IPv6 support, s6-networking is IPv6-ready.
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.4.0.2 or later. It's a build-time requirement. It's also a run-time +2.5.0.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library.
  • execline version -2.2.0.0 or later. It's a build-time and run-time requirement.
  • +2.3.0.0 or later. It's a build-time and run-time requirement.
  • s6 version -2.4.0.0 or later. It's a build-time and run-time requirement.
  • +2.5.0.0 or later. It's a build-time and run-time requirement.
  • s6-dns version -2.1.0.0 or later. It's a build-time requirement. It's also a run-time +2.2.0.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the s6-dns libraries.
  • If you want to build the secure communication tools: The chosen library is a build-time requirement, and also a run-time requirement if you link against its shared version.
  • @@ -76,7 +76,7 @@ run-time requirement if you link against its shared version. -

    -Please note that for now, support for client -certificates is experimental, and only works -with the LibreSSL -backend (BearSSL does not support client certificates yet). -

    -

    If s6-tlsd is run as root, it can also read two more environment variables, TLS_UID and TLS_GID, @@ -251,9 +244,10 @@ This is the default. and break the connection when prog sends EOF.

  • -s : transmit EOF by half-closing the TCP connection without using close_notify. This is the default.
  • -
  • -Y : Do not require a client certificate. This is the default.
  • -
  • -y : Require a client certificate. This is experimental and -for now unsupported by BearSSL.
  • +
  • -Y : Require an optional client certificate.
  • +
  • -y : Require a mandatory client certificate. +The default, with neither the -Y nor the -y option, +is not to require a client certificate at all.
  • -K kimeout : close the connection if kimeout milliseconds elapse without any data being received from either side. The default is 0, which means diff --git a/doc/upgrade.html b/doc/upgrade.html index dfd90f0..1cbd9b7 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,18 @@

    What has changed in s6-networking

    +

    in 2.3.0.0

    + + +

    in 2.2.1.0