summaryrefslogtreecommitdiff
path: root/lib/alert.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-07 09:50:29 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-07-17 17:08:01 +0200
commit3761340bf38d151439f8155039a3a367fc51a283 (patch)
treebd6775f6b9a20db5f3e5e31ce0eaef7432b8792c /lib/alert.c
parentd3b07f1a2700cc19c82dc7671cdbde112cc4b00e (diff)
downloadgnutls-3761340bf38d151439f8155039a3a367fc51a283.tar.gz
handshake: return better error code on unwanted algorithm
That is, when a signature algorithm is available which was not asked by the peer, then return GNUTLS_E_UNWANTED_ALGORITHM instead of the UNKNOWN_ALGORITHM. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/alert.c')
-rw-r--r--lib/alert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/alert.c b/lib/alert.c
index d3d58888fc..0aa3a69aa8 100644
--- a/lib/alert.c
+++ b/lib/alert.c
@@ -250,6 +250,7 @@ int gnutls_error_to_alert(int err, int *level)
case GNUTLS_E_SAFE_RENEGOTIATION_FAILED:
case GNUTLS_E_INCOMPAT_DSA_KEY_WITH_TLS_PROTOCOL:
case GNUTLS_E_UNKNOWN_PK_ALGORITHM:
+ case GNUTLS_E_UNWANTED_ALGORITHM:
ret = GNUTLS_A_HANDSHAKE_FAILURE;
_level = GNUTLS_AL_FATAL;
break;