CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/hmac

2018-02-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb  9 17:11:14 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h

Log Message:
add reset, needed by nsd.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.6 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.7
--- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.6	Tue Feb  6 14:58:30 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h	Fri Feb  9 12:11:14 2018
@@ -119,6 +119,12 @@ static inline void HMAC_CTX_free(HMAC_CT
 	HMAC_CTX_cleanup(ctx);
 	free(ctx);
 }
+
+static inline void HMAC_CTX_reset(HMAC_CTX *ctx)
+{
+	HMAC_CTX_cleanup(ctx);
+	HMAC_CTX_init(ctx);
+}
 #endif
 
 



CVS commit: src/crypto/external/bsd/openssl.old/dist/crypto/hmac

2018-02-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb  5 00:42:47 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl.old/dist/crypto/hmac: hmac.h

Log Message:
provide compatibility for libradius


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1 src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.2
--- src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h:1.1.1.1	Sat Feb  3 17:43:45 2018
+++ src/crypto/external/bsd/openssl.old/dist/crypto/hmac/hmac.h	Sun Feb  4 19:42:46 2018
@@ -102,6 +102,24 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C
 
 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
 
+static inline HMAC_CTX *HMAC_CTX_new(void)
+{
+	HMAC_CTX *ctx = malloc(sizeof(*ctx));
+	if (ctx == NULL)
+		return NULL;
+	HMAC_CTX_init(ctx);
+	return ctx;
+}
+
+static inline void HMAC_CTX_free(HMAC_CTX *ctx)
+{
+	if (ctx == NULL)
+		return;
+	HMAC_CTX_cleanup(ctx);
+	free(ctx);
+}
+
+
 #ifdef  __cplusplus
 }
 #endif