1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-09 13:09:39 +03:00

Remove incidental md5() function uses from main regression tests

Most of these calls were to generate some random data.  These can be
replaced by appropriately adapted sha256() calls.  To keep the diff
smaller, we wrap this into a helper function that produces the same
output format and length as the md5() call.

This will eventually allow these tests to pass in OpenSSL FIPS mode
(which does not allow MD5 use).

Similar work for other test suites will follow later.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/dbbd927f-ef1f-c9a1-4ec6-c759778ac852@enterprisedb.com
This commit is contained in:
Peter Eisentraut
2023-03-13 10:15:44 +01:00
parent d72900bded
commit 208bf364a9
26 changed files with 374 additions and 353 deletions

View File

@@ -677,12 +677,12 @@ insert into src
create type textandtext as (c1 text, c2 text);
create temp table dest (f1 textandtext[]);
insert into dest select array[row(f1,f1)::textandtext] from src;
select length(md5((f1[1]).c2)) from dest;
select length(fipshash((f1[1]).c2)) from dest;
delete from src;
select length(md5((f1[1]).c2)) from dest;
select length(fipshash((f1[1]).c2)) from dest;
truncate table src;
drop table src;
select length(md5((f1[1]).c2)) from dest;
select length(fipshash((f1[1]).c2)) from dest;
drop table dest;
drop type textandtext;