]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix isc_crypto_aead_open() for OpenSSL 1.1.x
authorAram Sargsyan <aram@isc.org>
Wed, 15 Jul 2026 13:19:17 +0000 (13:19 +0000)
committerAram Sargsyan <aram@isc.org>
Tue, 21 Jul 2026 10:10:49 +0000 (10:10 +0000)
The ciphertext length passed to the EVP_DecryptUpdate() function
included the tag length too. Use the 'len' variable instead which
doesn't include the tag length.

lib/isc/crypto/ossl1_1.c

index ac9d876d3fe7f6a13eaa58f9844488c73b51ae33..7456afc24556f1ed437462254112682a09cd6e33 100644 (file)
@@ -642,8 +642,7 @@ isc_crypto_aead_open(isc_crypto_aead_t *aead, isc_constregion_t nonce,
        }
 
        len = out.length;
-       if (EVP_DecryptUpdate(aead, out.base, &len, ciphertext.base,
-                             ciphertext.length) != 1)
+       if (EVP_DecryptUpdate(aead, out.base, &len, ciphertext.base, len) != 1)
        {
                CLEANUP(ISC_R_CRYPTOFAILURE);
        }