Refactor SHA2 functions and move them to src/common/.
This way both frontend and backends can use them. The functions are taken
from pgcrypto, which now fetches the source files it needs from
src/common/.
A new interface is designed for the SHA2 functions, which allow linking
to either OpenSSL or the in-core stuff taken from KAME as needed.
Michael Paquier, reviewed by Robert Haas.
Discussion: https://www.postgresql.org/message-id/CAB7nPqTGKuTM5jiZriHrNaQeVqp5e_iT3X4BFLWY_HyHxLvySQ%40mail.gmail.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/273c458a2b3a0fb73968020ea5e9e35eb6928967
Modified Files
--------------
contrib/pgcrypto/.gitignore | 4 +
contrib/pgcrypto/Makefile | 9 +-
contrib/pgcrypto/internal-sha2.c | 82 ++--
contrib/pgcrypto/sha2.c | 992 -------------------------------------
contrib/pgcrypto/sha2.h | 100 ----
src/common/Makefile | 6 +
src/common/sha2.c | 1006 ++++++++++++++++++++++++++++++++++++++
src/common/sha2_openssl.c | 102 ++++
src/include/common/sha2.h | 115 +++++
src/tools/msvc/Mkvcbuild.pm | 20 +-
10 files changed, 1297 insertions(+), 1139 deletions(-)