diff options
author | Bruce Momjian | 2006-05-30 12:56:45 +0000 |
---|---|---|
committer | Bruce Momjian | 2006-05-30 12:56:45 +0000 |
commit | 56f44784f62c62a4f8c149bc618a4ccc97e96db2 (patch) | |
tree | 672db75fc6a2dcbe030dccca7aa0d6f97f23cf24 /contrib/pgcrypto/sha2.c | |
parent | 39b031d417b0d66438f80d39335298d069fb6d88 (diff) |
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
Diffstat (limited to 'contrib/pgcrypto/sha2.c')
-rw-r--r-- | contrib/pgcrypto/sha2.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/pgcrypto/sha2.c b/contrib/pgcrypto/sha2.c index 46f44679bd5..19febaa1199 100644 --- a/contrib/pgcrypto/sha2.c +++ b/contrib/pgcrypto/sha2.c @@ -33,7 +33,7 @@ * * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $ * - * $PostgreSQL: pgsql/contrib/pgcrypto/sha2.c,v 1.5 2005/10/15 02:49:06 momjian Exp $ + * $PostgreSQL: pgsql/contrib/pgcrypto/sha2.c,v 1.6 2006/05/30 12:56:45 momjian Exp $ */ #include "postgres.h" @@ -163,9 +163,9 @@ * library -- they are intended for private internal visibility/use * only. */ -void SHA512_Last(SHA512_CTX *); -void SHA256_Transform(SHA256_CTX *, const uint8 *); -void SHA512_Transform(SHA512_CTX *, const uint8 *); +static void SHA512_Last(SHA512_CTX *); +static void SHA256_Transform(SHA256_CTX *, const uint8 *); +static void SHA512_Transform(SHA512_CTX *, const uint8 *); /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ @@ -307,7 +307,7 @@ SHA256_Init(SHA256_CTX * context) j++; \ } while(0) -void +static void SHA256_Transform(SHA256_CTX * context, const uint8 *data) { uint32 a, @@ -378,7 +378,7 @@ SHA256_Transform(SHA256_CTX * context, const uint8 *data) } #else /* SHA2_UNROLL_TRANSFORM */ -void +static void SHA256_Transform(SHA256_CTX * context, const uint8 *data) { uint32 a, @@ -631,7 +631,7 @@ SHA512_Init(SHA512_CTX * context) j++; \ } while(0) -void +static void SHA512_Transform(SHA512_CTX * context, const uint8 *data) { uint64 a, @@ -699,7 +699,7 @@ SHA512_Transform(SHA512_CTX * context, const uint8 *data) } #else /* SHA2_UNROLL_TRANSFORM */ -void +static void SHA512_Transform(SHA512_CTX * context, const uint8 *data) { uint64 a, @@ -842,7 +842,7 @@ SHA512_Update(SHA512_CTX * context, const uint8 *data, size_t len) usedspace = freespace = 0; } -void +static void SHA512_Last(SHA512_CTX * context) { unsigned int usedspace; |