Module Name: src
Committed By: christos
Date: Mon Feb 5 16:12:52 UTC 2018
Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/hmac: hmac.h
Log Message:
more openssl-1.1 compat.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssl/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/dist/crypto/hmac/hmac.h
diff -u src/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h:1.2 src/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h:1.3
--- src/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h:1.2 Fri Jun 12 13:01:12 2015
+++ src/crypto/external/bsd/openssl/dist/crypto/hmac/hmac.h Mon Feb 5 11:12:52 2018
@@ -102,6 +102,26 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C
void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
+#ifdef OPENSSL_VERSION_NUMBER >= 0x10100000L
+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);
+}
+#endif
+
+
#ifdef __cplusplus
}
#endif