** libgnutls: Corrected issue when receiving client hello verify requests
in DTLS.
+** libgnutls: Fixes in DTLS record overhead size calculations.
+
** API and ABI modifications:
gnutls_session_set_id: Added
/* requires padding */
iv_size = gnutls_cipher_get_iv_size(params->cipher_algorithm);
+ total += iv_size;
if (_gnutls_cipher_is_block (params->cipher_algorithm) == CIPHER_BLOCK)
{
- *blocksize = iv_size;
-
- total += iv_size; /* iv_size == block_size in DTLS */
+ *blocksize = iv_size; /* in block ciphers */
/* We always pad with at least one byte; never 0. */
if (session->security_parameters.new_record_padding == 0)
mtu += overhead;
/* Round it up to the next multiple of blocksize */
- mtu += blocksize - 1;
- mtu -= mtu % blocksize;
+ if (blocksize > 1)
+ {
+ mtu += blocksize - 1;
+ mtu -= mtu % blocksize;
+ }
/* Add the *unencrypted header size */
mtu += RECORD_HEADER_SIZE(session);