* When postgres.h does not define BYTE_ENDIAN pgcrypto
Bruce Momjian <bruce@momjian.us>
* When postgres.h does not define BYTE_ENDIAN pgcrypto
produces garbage.
I learned the hard way that
#if UNDEFINED_1 == UNDEFINED_2
#error "gcc is idiot"
#endif
prints "gcc is idiot" ...
Affected are MD5/SHA1 in internal library, and also HMAC-MD5/HMAC-SHA1/
crypt-md5 which use them. Blowfish is ok, also Rijndael on at
least x86.
Big thanks to Daniel Holtzman who send me a build log which
contained warning:
md5.c:246: warning: `X' defined but not used
Yes, gcc is that helpful...
Please apply this.
--
marko
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgcrypto/blf.c | modified | +2 −0 |
| contrib/pgcrypto/crypt-blowfish.c | modified | +2 −0 |
| contrib/pgcrypto/crypt-des.c | modified | +1 −0 |
| contrib/pgcrypto/crypt-gensalt.c | modified | +1 −0 |
| contrib/pgcrypto/md5.c | modified | +2 −1 |
| contrib/pgcrypto/px.h | modified | +10 −1 |
| contrib/pgcrypto/rijndael.c | modified | +1 −0 |
| contrib/pgcrypto/sha1.c | modified | +2 −1 |