aboutsummaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/sha2.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-05-30 12:56:45 +0000
committerBruce Momjian <bruce@momjian.us>2006-05-30 12:56:45 +0000
commit56f44784f62c62a4f8c149bc618a4ccc97e96db2 (patch)
tree672db75fc6a2dcbe030dccca7aa0d6f97f23cf24 /contrib/pgcrypto/sha2.h
parent39b031d417b0d66438f80d39335298d069fb6d88 (diff)
downloadpostgresql-56f44784f62c62a4f8c149bc618a4ccc97e96db2.tar.gz
postgresql-56f44784f62c62a4f8c149bc618a4ccc97e96db2.zip
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.h')
-rw-r--r--contrib/pgcrypto/sha2.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/pgcrypto/sha2.h b/contrib/pgcrypto/sha2.h
index 824bcefd29b..95f8a2400d7 100644
--- a/contrib/pgcrypto/sha2.h
+++ b/contrib/pgcrypto/sha2.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/pgcrypto/sha2.h,v 1.2 2005/10/15 02:49:06 momjian Exp $ */
+/* $PostgreSQL: pgsql/contrib/pgcrypto/sha2.h,v 1.3 2006/05/30 12:56:45 momjian Exp $ */
/* $OpenBSD: sha2.h,v 1.2 2004/04/28 23:11:57 millert Exp $ */
/*
@@ -38,6 +38,16 @@
#ifndef _SHA2_H
#define _SHA2_H
+/* avoid conflict with OpenSSL */
+#define SHA256_Init pg_SHA256_Init
+#define SHA256_Update pg_SHA256_Update
+#define SHA256_Final pg_SHA256_Final
+#define SHA384_Init pg_SHA384_Init
+#define SHA384_Update pg_SHA384_Update
+#define SHA384_Final pg_SHA384_Final
+#define SHA512_Init pg_SHA512_Init
+#define SHA512_Update pg_SHA512_Update
+#define SHA512_Final pg_SHA512_Final
/*** SHA-256/384/512 Various Length Definitions ***********************/
#define SHA256_BLOCK_LENGTH 64