Fix test "NUL byte in text decrypt" for --without-zlib builds.

Backpatch-through: 14
Security: CVE-2026-2006
This commit is contained in:
Noah Misch 2026-02-09 09:08:10 -08:00
parent b69af3dda2
commit 4543b02af3
3 changed files with 15 additions and 12 deletions

View file

@ -388,7 +388,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
NOTICE: dbg: parse_literal_data: data type=b
ERROR: Not text data
-- NUL byte in text decrypt. Ciphertext source:
-- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@ -396,9 +397,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
=c2cz
jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then

View file

@ -384,7 +384,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
NOTICE: dbg: parse_literal_data: data type=b
ERROR: Not text data
-- NUL byte in text decrypt. Ciphertext source:
-- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@ -392,9 +393,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
=c2cz
jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then

View file

@ -283,7 +283,8 @@ VsxxqLSPzNLAeIspJk5G
select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
-- NUL byte in text decrypt. Ciphertext source:
-- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@ -291,9 +292,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
=c2cz
jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then