Refactor SHA2 functions and move them to src/common/.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Mar 2017 12:23:49 +0000 (14:23 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 7 Mar 2017 12:23:49 +0000 (14:23 +0200)
commit273c458a2b3a0fb73968020ea5e9e35eb6928967
tree9dac9fb2207a734d1304a457eb7bddd8fad3cfb4
parent330b84d8c40864007833e05dc9d849c4bda77240
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
contrib/pgcrypto/.gitignore
contrib/pgcrypto/Makefile
contrib/pgcrypto/internal-sha2.c
contrib/pgcrypto/sha2.h [deleted file]
src/common/Makefile
src/common/sha2.c [moved from contrib/pgcrypto/sha2.c with 82% similarity]
src/common/sha2_openssl.c [new file with mode: 0644]
src/include/common/sha2.h [new file with mode: 0644]
src/tools/msvc/Mkvcbuild.pm