mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-03 22:47:18 +02:00
This adds several alternative expected files for when MD5 and 3DES are not available. This is similar to the alternative expected files for when the legacy provider is disabled. In fact, running the pgcrypto tests in FIPS mode makes use of some of these existing alternative expected files as well (e.g., for blowfish). These new expected files currently cover the FIPS mode provided by OpenSSL 3.x as well as the modified OpenSSL 3.x from Red Hat (e.g., Fedora 38), but not the modified OpenSSL 1.x from Red Hat (e.g., Fedora 35). (The latter will have some error message wording differences.) Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/dbbd927f-ef1f-c9a1-4ec6-c759778ac852%40enterprisedb.com
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
--
|
|
-- HMAC-MD5
|
|
--
|
|
SELECT hmac(
|
|
'Hi There',
|
|
'\x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 2
|
|
SELECT hmac(
|
|
'Jefe',
|
|
'what do ya want for nothing?',
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 3
|
|
SELECT hmac(
|
|
'\xdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'::bytea,
|
|
'\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 4
|
|
SELECT hmac(
|
|
'\xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd'::bytea,
|
|
'\x0102030405060708090a0b0c0d0e0f10111213141516171819'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 5
|
|
SELECT hmac(
|
|
'Test With Truncation',
|
|
'\x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 6
|
|
SELECT hmac(
|
|
'Test Using Larger Than Block-Size Key - Hash Key First',
|
|
'\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|
|
-- 7
|
|
SELECT hmac(
|
|
'Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data',
|
|
'\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::bytea,
|
|
'md5');
|
|
ERROR: Cannot use "md5": Cipher cannot be initialized
|