summaryrefslogtreecommitdiff
path: root/lib/dtls.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-05 15:36:18 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-22 12:54:18 +0200
commit1b3ece44acaa25c149659a6878d2be807a282f02 (patch)
tree1e37ffe93e058d49634c9e62cde98be65d015150 /lib/dtls.c
parent60c32a7527ddf5e9889a2e6d25f530f0e25212f3 (diff)
downloadgnutls-1b3ece44acaa25c149659a6878d2be807a282f02.tar.gz
Removed support for compression mechanisms
They are not required for TLS 1.3, and are deprecated for TLS 1.2. We eliminate them in order to reduce the complexity in the record packet handling. Resolves #212 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/dtls.c')
-rw-r--r--lib/dtls.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/dtls.c b/lib/dtls.c
index ba953ae374..07c4537904 100644
--- a/lib/dtls.c
+++ b/lib/dtls.c
@@ -495,7 +495,6 @@ void gnutls_dtls_set_mtu(gnutls_session_t session, unsigned int mtu)
static int record_overhead(const cipher_entry_st * cipher,
const mac_entry_st * mac,
- gnutls_compression_method_t comp,
unsigned etm,
unsigned est_data)
{
@@ -518,9 +517,6 @@ static int record_overhead(const cipher_entry_st * cipher,
total += hash_len;
}
- if (comp != GNUTLS_COMP_NULL)
- total += EXTRA_COMP_SIZE;
-
/* This must be last */
if (_gnutls_cipher_type(cipher) == CIPHER_BLOCK) {
int rem, exp_iv;
@@ -554,7 +550,7 @@ static int record_overhead(const cipher_entry_st * cipher,
* @version: is a #gnutls_protocol_t value
* @cipher: is a #gnutls_cipher_algorithm_t value
* @mac: is a #gnutls_mac_algorithm_t value
- * @comp: is a #gnutls_compression_method_t value
+ * @comp: is a #gnutls_compression_method_t value (ignored)
* @flags: must be zero
*
* This function will return the set size in bytes of the overhead
@@ -595,7 +591,7 @@ size_t gnutls_est_record_overhead_size(gnutls_protocol_t version,
else
total = DTLS_RECORD_HEADER_SIZE;
- total += record_overhead(c, m, comp, 0, 0);
+ total += record_overhead(c, m, 0, 0);
return total;
}
@@ -622,7 +618,7 @@ static int record_overhead_rt(gnutls_session_t session, unsigned est_data)
return gnutls_assert_val(ret);
return record_overhead(params->cipher, params->mac,
- params->compression_algorithm, params->etm, est_data);
+ params->etm, est_data);
}
/**