postgresql/contrib
Michael Paquier b67b57a966 Refactor MD5 implementations according to new cryptohash infrastructure
This commit heavily reorganizes the MD5 implementations that exist in
the tree in various aspects.

First, MD5 is added to the list of options available in cryptohash.c and
cryptohash_openssl.c.  This means that if building with OpenSSL, EVP is
used for MD5 instead of the fallback implementation that Postgres had
for ages.  With the recent refactoring work for cryptohash functions,
this change is straight-forward.  If not building with OpenSSL, a
fallback implementation internal to src/common/ is used.

Second, this reduces the number of MD5 implementations present in the
tree from two to one, by moving the KAME implementation from pgcrypto to
src/common/, and by removing the implementation that existed in
src/common/.  KAME was already structured with an init/update/final set
of routines by pgcrypto (see original pgcrypto/md5.h) for compatibility
with OpenSSL, so moving it to src/common/ has proved to be a
straight-forward move, requiring no actual manipulation of the internals
of each routine.  Some benchmarking has not shown any performance gap
between both implementations.

Similarly to the fallback implementation used for SHA2, the fallback
implementation of MD5 is moved to src/common/md5.c with an internal
header called md5_int.h for the init, update and final routines.  This
gets then consumed by cryptohash.c.

The original routines used for MD5-hashed passwords are moved to a
separate file called md5_common.c, also in src/common/, aimed at being
shared between all MD5 implementations as utility routines to keep
compatibility with any code relying on them.

Like the SHA2 changes, this commit had its round of tests on both Linux
and Windows, across all versions of OpenSSL supported on HEAD, with and
even without OpenSSL.

Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20201106073434.GA4961@paquier.xyz
2020-12-10 11:59:10 +09:00
..
adminpack
amcheck Fix some typos 2020-11-14 11:43:10 +09:00
auth_delay
auto_explain
bloom
bool_plperl
btree_gin
btree_gist Expose internal function for converting int64 to numeric 2020-09-09 20:16:28 +02:00
citext
cube
dblink Move catalog index declarations 2020-11-07 12:26:24 +01:00
dict_int
dict_xsyn
earthdistance
file_fdw Remove leftover comments, left behind by removal of WITH OIDS. 2020-11-30 10:26:43 +02:00
fuzzystrmatch
hstore
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl Expose internal function for converting int64 to numeric 2020-09-09 20:16:28 +02:00
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
old_snapshot Add new 'old_snapshot' contrib module. 2020-09-24 13:55:47 -04:00
pageinspect
passwordcheck
pg_buffercache
pg_freespacemap
pg_prewarm Fix and simplify some usages of TimestampDifference(). 2020-11-10 22:51:54 -05:00
pg_standby
pg_stat_statements pg_stat_statements: Track number of times pgss entries were deallocated. 2020-11-26 21:18:05 +09:00
pg_surgery pg_surgery: Try to stabilize regression tests. 2020-09-18 13:26:48 -04:00
pg_trgm Handle equality operator in contrib/pg_trgm 2020-11-15 08:52:35 +03:00
pg_visibility
pgcrypto Refactor MD5 implementations according to new cryptohash infrastructure 2020-12-10 11:59:10 +09:00
pgrowlocks
pgstattuple
postgres_fdw Support subscripting of arbitrary types, not only arrays. 2020-12-09 12:40:37 -05:00
seg
sepgsql Fix expected output: the order of agg permission checks changed. 2020-11-24 12:50:16 +02:00
spi
sslinfo Use be_tls_* API for SSL information in sslinfo 2020-11-03 09:47:36 +01:00
start-scripts
tablefunc tablefunc: Reject negative number of tuples passed to normal_rand() 2020-11-25 15:30:18 +01:00
tcn
test_decoding Fix 'skip-empty-xacts' option in test_decoding for streaming mode. 2020-11-17 12:14:53 +05:30
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
vacuumlo
xml2
contrib-global.mk
Makefile Add new 'old_snapshot' contrib module. 2020-09-24 13:55:47 -04:00
README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.