]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add support for OpenSSL TLS 1.3 when using management-external-key
authorArne Schwabe <arne@rfc2549.org>
Wed, 4 Dec 2019 11:08:36 +0000 (12:08 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 4 Dec 2019 15:50:45 +0000 (16:50 +0100)
commit8be444df89be09689ba82e58cbc89452a5fcceca
treeb0f9926505c1a5ae32092b7bbac81e83d4902aba
parent6328aef94a748bd9859ae5cd264b7e50fbb8a325
Add support for OpenSSL TLS 1.3 when using management-external-key

For TLS versions 1.0 to 1.2 and OpenSSL 1.1.0 and requires a PKCS1
padded response for the external key implementation.
As TLS 1.3 mandates RSA-PSS padding support and also requires an
TLS 1.3 implementation to support RSA-PSS for older TLS
version, OpenSSL will query us to sign an already RSA-PSS padded
string.

This patch adds an 'unpadded' and 'pkcs1' parameter to the
management-external-key option to signal that the client is
able to support pkcs1 as well as unpadded signature requests.

Since clients that implement the management-external-key interface
are usually rather tightly integrated solutions (OpenVPN Connect in the
past, OpenVPN for Android), it is reasonable to expect that
upgrading the OpenSSL library can be done together with
management interface changes. Therefore we provide no backwards
compatbility for mangement-interface clients not supporting
OpenSSL 1.1.1. Also doing this would require downgrading TLS
to 1.1.

Using the management api client version instead the parameters to
management-external-key might seem like the more logical way
but since we only know that version very late in connection progress,
it would require extra logic and complexity to deal with this asynchronous
behaviour. Instead just give an error early if OpenSSL 1.1.1 and
management-external-key without nopadding is detected.

The interface is prepared for signalling PCKS1 and RSA-PSS support
instead of signalling unpadded support.

Patch v3: fix overlong lines and few other style patches. Note
      two overlong lines concerning mbedtls are not fixed as they
      are removed/shortend by the mbed tls patch to avoid conflicts

Patch v4: Setting minimum TLS version proved to be not enough and
      instead of implementing a whole compability layer we require
      mangement-clients to implement the new feature when they want
      to use OpenSSL 1.1.1

      Add a padding=ALGORITHM argument to pk-sig to indicate the
      algorithm. Drop adding PKCS1 ourselves.

Patch v5: Send the right version of the patch
Patch v6: rebase on master
Patch v7: change style and reword documentation. Make things more
consistent.
Patch v8: fix spellings, grammar.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20191204110836.6364-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19219.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/management-notes.txt
doc/openvpn.8
src/openvpn/manage.c
src/openvpn/manage.h
src/openvpn/options.c
src/openvpn/ssl_mbedtls.c
src/openvpn/ssl_openssl.c