From 76a36980372b8dbf82a0ada18a1ebae3d94c5fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Wed, 7 Jul 2021 13:37:48 +0200 Subject: [PATCH 4/7] Disable unsupported OpenSSL features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Disable no-certificate PSK authentication There is no obvious way to reimplement it using only OpenSSL 1.0 public APIs. - Disable queries for standard cipher name OpenSSL 1.0 does not record said names. - Remove ClientHello getters The disabled functions internally use `SSL_client_hello_get0_ext`/`SSL_client_hello_get0_ciphers`, which are not available on legacy OpenSSL. There may be another way to get to the same data, but nothing jumps out in the OpenSSL 1.0.2 documentation. - Remove TLSv1.3 CLI options - Remove usage of OPENSSL_secure_{malloc,clear_free} Unsupported in OpenSSL 1.0. The expected semantics is the same as using the regular versions, so the possibility of using the secure heap was simply removed. Signed-off-by: Jan Staněk --- doc/api/cli.md | 18 ------------------ doc/api/tls.md | 15 +++++++-------- src/env.h | 11 ++++++++++- src/node_crypto.cc | 8 ++++++-- src/node_crypto_common.cc | 12 ++++++++++++ src/node_crypto_common.h | 6 ++++++ src/node_options.cc | 10 +++++++++- .../test-tls-cli-max-version-1.3.js | 0 .../test-tls-cli-min-max-conflict.js | 0 .../test-tls-cli-min-version-1.3.js | 0 10 files changed, 50 insertions(+), 30 deletions(-) rename test/{parallel => known_issues}/test-tls-cli-max-version-1.3.js (100%) rename test/{parallel => known_issues}/test-tls-cli-min-max-conflict.js (100%) rename test/{parallel => known_issues}/test-tls-cli-min-version-1.3.js (100%) diff --git a/doc/api/cli.md b/doc/api/cli.md index 3f3e5e4eeb..48e51fcdfa 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -893,14 +893,6 @@ added: Set [`tls.DEFAULT_MAX_VERSION`][] to 'TLSv1.2'. Use to disable support for TLSv1.3. -### `--tls-max-v1.3` - - -Set default [`tls.DEFAULT_MAX_VERSION`][] to 'TLSv1.3'. Use to enable support -for TLSv1.3. - ### `--tls-min-v1.0` - -Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support -for TLSv1.2, which is not as secure as TLSv1.3. - ### `--trace-atomics-wait`