Print a more user-friendly error when tls-crypt-v2 client auth fails
PATCH 1/1 Print a more user-friendly error when tls-crypt-v2 client auth fails
While it might be clear to people being (too?) well versed in typical crypto applications that an authentication failure probably mean wrong decryption key, this is not really obvious for the typical user/server admin.
--- src/openvpn/tls_crypt.c | 2 ++ 1 file changed, 2 insertions(+)
src/openvpn/tls_crypt.c +2 -0
@@ -524,6 +524,8 @@ tls_crypt_v2_unwrap_client_key(struct key2 *client_key, struct buffer *metadata,dmsg (D_CRYPTO_DEBUG ,"tag_check: %s" ,format_hex (tag_check,sizeof (tag_check),0 , &gc));CRYPT_ERROR ("client key authentication error" ); +msg (D_TLS_DEBUG_LOW ,"This might be a client-key that was generated for " +"a different tls-crypt-v2 server key)" ); }if (buf_len (&plaintext) <sizeof (client_key->keys))
Signature · 1 line
2.39.2 (Apple Git-143)
I find this a useful addition - with all these crypto stuff it can be quite hard to figure out what particular detail is not right.
The patch is trivial, just adding a msg(), so I did not really test it beyond "compile?" and "does it have a space before or after the wrap?" (it has).
Your patch has been applied to the master branch.
commit 7a477c16a7c2a7016c7b15ea98fe3c40e8ef675b (master) commit 66f51e80b981f08ebc3c38f3fac7d0c88caeb85d (release/2.6)
Author: Arne Schwabe Date: Mon May 22 11:12:31 2023 +0200
Print a more user-friendly error when tls-crypt-v2 client auth fails
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg26718.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering