From 6cafbb3ae808c4f32be8ab143838c70985188fe8 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 29 Apr 2024 16:05:54 +0200 Subject: [PATCH] Fix PSK invocation: GnuTLS prompting When given a PSK key but no username, gnutls-cli prompts for a password. Prevent that by passing --pskusername with the same identity that ssl_server2 uses by default. Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 412f42c04..51974f6d3 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -354,7 +354,7 @@ adapt_cmd_for_psk () { case "$2" in *openssl*s_server*) s='-psk abc123 -nocert';; *openssl*) s='-psk abc123';; - *gnutls-*) s='--pskkey=abc123';; + *gnutls-*) s='--pskusername=Client_identity --pskkey=abc123';; *) s='psk=abc123';; esac eval $1='"$2 $s"'