1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

Add a patch to resolve symbol conflict between SHA2 module with OpenSSL's

SHA2 implementation.

Without this, e.g. SSHA512 scheme would result in a crash due to stack
corruption, which is a result of different SHA512 context size in the
contributed SHA2 implementation and the OpenSSL one, plus the allocation
is on stack.

PR:		197004
MFH:		2015Q2
This commit is contained in:
Xin LI 2015-05-27 22:08:40 +00:00
parent 9cee0306eb
commit 078b145883
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=387682

View File

@ -0,0 +1,24 @@
--- contrib/slapd-modules/passwd/sha2/sha2.h.orig 2014-09-19 01:48:49 UTC
+++ contrib/slapd-modules/passwd/sha2/sha2.h
@@ -142,6 +142,21 @@ typedef struct _SHA512_CTX {
typedef SHA512_CTX SHA384_CTX;
+#define SHA256_Init _sha2_SHA256_Init
+#define SHA256_Update _sha2_SHA256_Update
+#define SHA256_Final _sha2_SHA256_Final
+#define SHA256_End _sha2_SHA256_End
+#define SHA256_Data _sha2_SHA256_Data
+#define SHA384_Init _sha2_SHA384_Init
+#define SHA384_Update _sha2_SHA384_Update
+#define SHA384_Final _sha2_SHA384_Final
+#define SHA384_End _sha2_SHA384_End
+#define SHA384_Data _sha2_SHA384_Data
+#define SHA512_Init _sha2_SHA512_Init
+#define SHA512_Update _sha2_SHA512_Update
+#define SHA512_Final _sha2_SHA512_Final
+#define SHA512_End _sha2_SHA512_End
+#define SHA512_Data _sha2_SHA512_Data
/*** SHA-256/384/512 Function Prototypes ******************************/
#ifndef NOPROTO