diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-30 01:42:14 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-30 01:42:44 +0200 |
commit | cf64fa749890eefae3201b403de6b4c1e565ba7f (patch) | |
tree | 104edbad8149a2e74b9de0ef9a6a52752182a915 | |
parent | 6259978aef726402104ab0950b8f460bf3d27331 (diff) | |
download | gnutls-cf64fa749890eefae3201b403de6b4c1e565ba7f.tar.gz |
only block ciphers need 1 byte padding.
-rw-r--r-- | lib/gnutls_dtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gnutls_dtls.c b/lib/gnutls_dtls.c index bd3c6371dd..02b37a9339 100644 --- a/lib/gnutls_dtls.c +++ b/lib/gnutls_dtls.c @@ -617,6 +617,9 @@ int total = 0, ret, iv_size; total += MAX_PAD_SIZE; else total += iv_size; /* iv_size == block_size */ + + /* We always pad with at least one byte; never 0. */ + total++; } else { @@ -635,9 +638,6 @@ int total = 0, ret, iv_size; if (params->compression_algorithm != GNUTLS_COMP_NULL) total += EXTRA_COMP_SIZE; - - /* We always pad with at least one byte; never 0. */ - total++; return total; } |