1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00
Commit Graph

8 Commits

Author SHA1 Message Date
c835be32cc pgcrypto: avoid name conflicts with OpenSSL in one more case.
I happened to notice that if compiled --with-gssapi, 9.6's
contrib/pgcrypto tests report memory stomps for some SHA operations.

Both MEMORY_CONTEXT_CHECKING and valgrind agree there's a problem,
though nothing crashes; it appears that the buffer overrun
only extends into alignment padding, at least on 64-bit hardware.

Investigation found that pgcrypto's references to SHA224_Init
et al were being captured by the system OpenSSL library, which
of course has slightly incompatible definitions of those functions.
We long ago noticed this problem with respect to the sibling
functions SHA256_Init and so on, and commit 56f44784f introduced
renaming macros to dodge the problem for those.  However, it didn't
cover the SHA224 family because we didn't use that at the time.
When commit 1abf76e82 added those awhile later, it neglected to add
a similar renaming macro.  Better late than never, so do so now.

This appears to affect all branches 8.2 - 9.6, so it's surprising
nobody noticed before now.  Maybe the effect is somehow specific
to the way RHEL8 intertwines its GSS and SSL libraries?  Anyway,
we refactored all this stuff in v10, so newer branches don't have
the problem.
2021-06-23 19:24:36 -04:00
0a78320057 pgindent run for 9.4
This includes removing tabs after periods in C comments, which was
applied to back branches, so this change should not effect backpatching.
2014-05-06 12:12:18 -04:00
9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
d747140279 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
2009-06-11 14:49:15 +00:00
1abf76e82c "Annual" pgcrypto update from Marko Kreen:
Few cleanups and couple of new things:

 - add SHA2 algorithm to older OpenSSL
 - add BIGNUM math to have public-key cryptography work on non-OpenSSL
   build.
 - gen_random_bytes() function

The status of SHA2 algoritms and public-key encryption can now be
changed to 'always available.'

That makes pgcrypto functionally complete and unless there will be new
editions of AES, SHA2 or OpenPGP standards, there is no major changes
planned.
2006-07-13 04:15:25 +00:00
56f44784f6 Re-defines SHA2 symbols so that they would not conflict with certain
versions of OpenSSL.  If your OpenSSL does not contain SHA2, then there
should be no conflict.  But ofcourse, if someone upgrades OpenSSL,
server starts crashing.

Backpatched to 8.1.X.

Marko Kreen
2006-05-30 12:56:45 +00:00
1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
e94dd6ab91 Add missing pgcrypto files from previous commit. 2005-07-10 13:46:29 +00:00