mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Ooops, missed that a couple of contrib modules have calls to byteacmp.
Add bytea.h inclusions as needed. Some of the contrib regression tests need to be de-hexified, too. Per buildfarm.
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
--
|
||||
-- Blowfish cipher
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
-- some standard Blowfish testvalues
|
||||
SELECT encode(encrypt(
|
||||
decode('0000000000000000', 'hex'),
|
||||
|
@ -8,6 +8,8 @@
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
RESET client_min_messages;
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
-- check for encoding fn's
|
||||
SELECT encode('foo', 'hex');
|
||||
encode
|
||||
|
@ -1,50 +1,52 @@
|
||||
--
|
||||
-- PGP Armor
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
select armor('');
|
||||
armor
|
||||
-----------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
=twTO
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
|
||||
=twTO
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
(1 row)
|
||||
|
||||
select armor('test');
|
||||
armor
|
||||
-----------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
dGVzdA==
|
||||
=+G7Q
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
|
||||
dGVzdA==
|
||||
=+G7Q
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
(1 row)
|
||||
|
||||
select dearmor(armor(''));
|
||||
dearmor
|
||||
---------
|
||||
|
||||
|
||||
(1 row)
|
||||
|
||||
select dearmor(armor('zooka'));
|
||||
dearmor
|
||||
---------
|
||||
zooka
|
||||
zooka
|
||||
(1 row)
|
||||
|
||||
select armor('0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
0123456789abcdef0123456789abcdef0123456789abcdef');
|
||||
armor
|
||||
------------------------------------------------------------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3
|
||||
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
|
||||
=JFw5
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
|
||||
=JFw5
|
||||
-----END PGP MESSAGE-----
|
||||
|
||||
(1 row)
|
||||
|
||||
-- lots formatting
|
||||
@ -60,7 +62,7 @@ em9va2E=
|
||||
-----END PGP MESSAGE-----');
|
||||
dearmor
|
||||
---------
|
||||
zooka
|
||||
zooka
|
||||
(1 row)
|
||||
|
||||
-- lots messages
|
||||
@ -88,7 +90,7 @@ d3Jvbmc=
|
||||
');
|
||||
dearmor
|
||||
---------
|
||||
right
|
||||
right
|
||||
(1 row)
|
||||
|
||||
-- bad crc
|
||||
|
@ -1,6 +1,8 @@
|
||||
--
|
||||
-- PGP encrypt
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key');
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
|
@ -1,6 +1,8 @@
|
||||
--
|
||||
-- PGP Public Key Encryption
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
-- successful encrypt/decrypt
|
||||
select pgp_pub_decrypt(
|
||||
pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
|
||||
|
@ -1,6 +1,8 @@
|
||||
--
|
||||
-- AES / Rijndael-128 cipher
|
||||
--
|
||||
-- ensure consistent test output regardless of the default bytea format
|
||||
SET bytea_output TO escape;
|
||||
-- some standard Rijndael testvalues
|
||||
SELECT encode(encrypt(
|
||||
decode('00112233445566778899aabbccddeeff', 'hex'),
|
||||
|
Reference in New Issue
Block a user