aboutsummaryrefslogtreecommitdiff
path: root/src/test/ssl/t/SSL/Server.pm
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2024-10-24 15:20:28 +0200
committerDaniel Gustafsson <dgustafsson@postgresql.org>2024-10-24 15:20:28 +0200
commit3d1ef3a15c3eb68dae44b94e89d04c422b26fc16 (patch)
treea710673741765cd033447a36f5e06005fa3fdc38 /src/test/ssl/t/SSL/Server.pm
parent6c66b7443cebf3ff09ea76416a20fb6bb1d32a52 (diff)
downloadpostgresql-3d1ef3a15c3eb68dae44b94e89d04c422b26fc16.tar.gz
postgresql-3d1ef3a15c3eb68dae44b94e89d04c422b26fc16.zip
Support configuring multiple ECDH curves
The ssl_ecdh_curve GUC only accepts a single value, but the TLS handshake can list multiple curves in the groups extension (the extension has been renamed to contain more than elliptic curves). This changes the GUC to accept a colon-separated list of curves. This commit also renames the GUC to ssl_groups to match the new nomenclature for the TLS extension. Original patch by Erica Zhang with additional hacking by me. Author: Erica Zhang <ericazhangy2021@qq.com> Author: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl> Discussion: https://postgr.es/m/tencent_063F89FA72CCF2E48A0DF5338841988E9809@qq.com
Diffstat (limited to 'src/test/ssl/t/SSL/Server.pm')
-rw-r--r--src/test/ssl/t/SSL/Server.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm
index de06f6f242f..c1b25a4ebf6 100644
--- a/src/test/ssl/t/SSL/Server.pm
+++ b/src/test/ssl/t/SSL/Server.pm
@@ -300,6 +300,9 @@ sub switch_server_cert
ok(unlink($node->data_dir . '/sslconfig.conf'));
$node->append_conf('sslconfig.conf', "ssl=on");
$node->append_conf('sslconfig.conf', $backend->set_server_cert(\%params));
+ # use lists of ECDH curves for syntax testing
+ $node->append_conf('sslconfig.conf', 'ssl_groups=prime256v1:secp521r1');
+
$node->append_conf('sslconfig.conf',
"ssl_passphrase_command='" . $params{passphrase_cmd} . "'")
if defined $params{passphrase_cmd};