summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-08 10:48:40 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-08 10:48:49 +0100
commit3b22f3055dac7f3b643feacce2fc338d8e9a35ed (patch)
tree529c46e84cbc9a3cb840be17b2a2fba2927dc33f
parent682eabdedd5bcb7c33e53a2f1806aa69b4e171ac (diff)
downloadgnutls-3b22f3055dac7f3b643feacce2fc338d8e9a35ed.tar.gz
gnutls.h: introduced GNUTLS_E_TLS_PACKET_DECODING_ERROR [ci skip]
This is an alias to GNUTLS_E_UNEXPECTED_PACKET_LENGTH. That allows distinguishing the alert from GNUTLS_E_RECORD_OVERFLOW. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/errors.c4
-rw-r--r--lib/includes/gnutls/gnutls.h.in1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/errors.c b/lib/errors.c
index 7634eaee28..7d50783950 100644
--- a/lib/errors.c
+++ b/lib/errors.c
@@ -64,10 +64,10 @@ static const gnutls_error_entry error_entries[] = {
("The Diffie-Hellman prime sent by the server is not acceptable (not long enough)."),
GNUTLS_E_DH_PRIME_UNACCEPTABLE),
ERROR_ENTRY(N_
- ("A TLS packet with unexpected length was received."),
+ ("Error decoding the received TLS packet."),
GNUTLS_E_UNEXPECTED_PACKET_LENGTH),
ERROR_ENTRY(N_
- ("A TLS packet with unexpected length was received."),
+ ("A TLS record packet with invalid length was received."),
GNUTLS_E_RECORD_OVERFLOW),
ERROR_ENTRY(N_("The TLS connection was non-properly terminated."),
GNUTLS_E_PREMATURE_TERMINATION),
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 5a071c0d04..63ce2d896d 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -2629,6 +2629,7 @@ unsigned gnutls_fips140_mode_enabled(void);
#define GNUTLS_E_UNKNOWN_CIPHER_TYPE -6
#define GNUTLS_E_LARGE_PACKET -7
#define GNUTLS_E_UNSUPPORTED_VERSION_PACKET -8 /* GNUTLS_A_PROTOCOL_VERSION */
+#define GNUTLS_E_TLS_PACKET_DECODING_ERROR GNUTLS_E_UNEXPECTED_PACKET_LENGTH
#define GNUTLS_E_UNEXPECTED_PACKET_LENGTH -9 /* GNUTLS_A_DECODE_ERROR */
#define GNUTLS_E_INVALID_SESSION -10
#define GNUTLS_E_FATAL_ALERT_RECEIVED -12