Refactor SHA2 functions and move them to src/common/.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgcrypto/.gitignore | modified | +4 −0 |
| contrib/pgcrypto/internal-sha2.c | modified | +41 −41 |
| contrib/pgcrypto/Makefile | modified | +8 −1 |
| contrib/pgcrypto/sha2.h | deleted | +0 −100 |
| src/common/Makefile | modified | +6 −0 |
| src/common/sha2.c (from contrib/pgcrypto/sha2.c) | renamed | +94 −80 |
| src/common/sha2_openssl.c | added | +102 −0 |
| src/include/common/sha2.h | added | +115 −0 |
| src/tools/msvc/Mkvcbuild.pm | modified | +15 −5 |
Discussion
- Password identifiers, protocol aging and SCRAM protocol 193 messages · 2016-02-23 → 2017-02-03