[master] 8844d6b Add compatibility macros for SHA -> VSHA

Dag Haavi Finstad daghf at varnish-software.com
Tue Oct 31 10:48:05 UTC 2017


commit 8844d6ba3a0ef8e984c6ac70a3acf2cf93f542f2
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Tue Oct 31 11:46:09 2017 +0100

    Add compatibility macros for SHA -> VSHA
    
    This should help the transition for VMOD writers that rely on the
    SHA256_* functions.

diff --git a/include/vsha256.h b/include/vsha256.h
index 9e98356..8f20505 100644
--- a/include/vsha256.h
+++ b/include/vsha256.h
@@ -43,4 +43,13 @@ void	VSHA256_Update(VSHA256_CTX *, const void *, size_t);
 void	VSHA256_Final(unsigned char [VSHA256_LEN], VSHA256_CTX *);
 void	VSHA256_Test(void);
 
+#define SHA256_LEN		VSHA256_LEN
+#define SHA256_DIGEST_LENGTH	VSHA256_DIGEST_LENGTH
+#define SHA256Context		VSHA256Context
+#define SHA256_CTX		VSHA256_CTX
+#define SHA256_Init		VSHA256_Init
+#define SHA256_Update		VSHA256_Update
+#define SHA256_Final		VSHA256_Final
+#define SHA256_Test		VSHA256_Test
+
 #endif /* !_VSHA256_H_ */


More information about the varnish-commit mailing list