diff options
| author | Eli Zaretskii | 2023-01-09 22:05:40 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-01-09 22:05:40 +0200 |
| commit | 5259f144d95d92dbda3d8db06b4f870bcfbb4a93 (patch) | |
| tree | 04b213d2969cb820133c4f9fc48d3b5655bc33ec /src/gnutls.c | |
| parent | ec105a45c9f8b56ade9e76324960a726eaf24038 (diff) | |
| download | emacs-5259f144d95d92dbda3d8db06b4f870bcfbb4a93.tar.gz emacs-5259f144d95d92dbda3d8db06b4f870bcfbb4a93.zip | |
Remove unneeded restriction in using AEAD ciphers with GnuTLS
* src/gnutls.c (gnutls_symmetric_aead): Disable the enforcement of
block size on input data. (Bug#60693)
Diffstat (limited to 'src/gnutls.c')
| -rw-r--r-- | src/gnutls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index e8528381efd..ca7e9fc4c73 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -2405,6 +2405,9 @@ gnutls_symmetric_aead (bool encrypting, gnutls_cipher_algorithm_t gca, | |||
| 2405 | aead_auth_size = aend_byte - astart_byte; | 2405 | aead_auth_size = aend_byte - astart_byte; |
| 2406 | } | 2406 | } |
| 2407 | 2407 | ||
| 2408 | /* Only block ciphers require that ISIZE be a multiple of the block | ||
| 2409 | size, and AEAD ciphers are not block ciphers. */ | ||
| 2410 | #if 0 | ||
| 2408 | ptrdiff_t expected_remainder = encrypting ? 0 : cipher_tag_size; | 2411 | ptrdiff_t expected_remainder = encrypting ? 0 : cipher_tag_size; |
| 2409 | ptrdiff_t cipher_block_size = gnutls_cipher_get_block_size (gca); | 2412 | ptrdiff_t cipher_block_size = gnutls_cipher_get_block_size (gca); |
| 2410 | 2413 | ||
| @@ -2414,6 +2417,7 @@ gnutls_symmetric_aead (bool encrypting, gnutls_cipher_algorithm_t gca, | |||
| 2414 | "is not %"pD"d greater than a multiple of the required %"pD"d"), | 2417 | "is not %"pD"d greater than a multiple of the required %"pD"d"), |
| 2415 | gnutls_cipher_get_name (gca), desc, | 2418 | gnutls_cipher_get_name (gca), desc, |
| 2416 | isize, expected_remainder, cipher_block_size); | 2419 | isize, expected_remainder, cipher_block_size); |
| 2420 | #endif | ||
| 2417 | 2421 | ||
| 2418 | ret = ((encrypting ? gnutls_aead_cipher_encrypt : gnutls_aead_cipher_decrypt) | 2422 | ret = ((encrypting ? gnutls_aead_cipher_encrypt : gnutls_aead_cipher_decrypt) |
| 2419 | (acipher, vdata, vsize, aead_auth_data, aead_auth_size, | 2423 | (acipher, vdata, vsize, aead_auth_data, aead_auth_size, |