summaryrefslogtreecommitdiff
path: root/lib/alert.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-11-29 09:24:12 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-11-29 10:20:55 +0100
commit68465b818f2bf39d4b8a1f5cae42c03fa1b9e338 (patch)
treef677519b8cff953014b2520b428921119df2731e /lib/alert.c
parente54d59e8aa25c39484e979ad9e4eb861e670578b (diff)
downloadgnutls-68465b818f2bf39d4b8a1f5cae42c03fa1b9e338.tar.gz
When decoding extensions do not ignore decoding errors
That is, move from a parsing error tolerance to a more strict decoding approach. Relates #40
Diffstat (limited to 'lib/alert.c')
-rw-r--r--lib/alert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/alert.c b/lib/alert.c
index 34f253b002..b8a4389e55 100644
--- a/lib/alert.c
+++ b/lib/alert.c
@@ -201,6 +201,10 @@ int gnutls_error_to_alert(int err, int *level)
ret = GNUTLS_A_BAD_RECORD_MAC;
_level = GNUTLS_AL_FATAL;
break;
+ case GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH:
+ ret = GNUTLS_A_DECODE_ERROR;
+ _level = GNUTLS_AL_FATAL;
+ break;
case GNUTLS_E_DECOMPRESSION_FAILED:
ret = GNUTLS_A_DECOMPRESSION_FAILURE;
_level = GNUTLS_AL_FATAL;