44 lines
1.8 KiB
Diff
44 lines
1.8 KiB
Diff
|
From 838b985510c360e651d18134e64f258f2f4c6e7c Mon Sep 17 00:00:00 2001
|
||
|
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||
|
Date: Fri, 31 Aug 2018 18:46:56 +0200
|
||
|
Subject: [PATCH] ntp_isc_md5: rename EVP_MD_CTX into PTPD_EVP_MD_CTX
|
||
|
|
||
|
EVP_MD_CTX can conflict with openssl that defines a completely different
|
||
|
typedef with same name.
|
||
|
|
||
|
Since this typedef is used only twice in the entire ptpd,
|
||
|
substitute EVP_MD_CTX with PTPD_EVP_MD_CTX.
|
||
|
|
||
|
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||
|
---
|
||
|
src/dep/ntpengine/ntp_isc_md5.c | 2 +-
|
||
|
src/dep/ntpengine/ntp_isc_md5.h | 2 +-
|
||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
Index: ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c
|
||
|
===================================================================
|
||
|
--- ptpd-ptpd-2.3.1.orig/src/dep/ntpengine/ntp_isc_md5.c
|
||
|
+++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.c
|
||
|
@@ -262,7 +262,7 @@ MD5authencrypt(
|
||
|
{
|
||
|
u_char digest[64];
|
||
|
u_int len;
|
||
|
- EVP_MD_CTX ctx;
|
||
|
+ PTPD_EVP_MD_CTX ctx;
|
||
|
pkt[length / 4] = htonl(keyid);
|
||
|
EVP_DigestInit(&ctx);
|
||
|
EVP_DigestUpdate(&ctx, (u_char *)key, (u_int)strlen(key));
|
||
|
Index: ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h
|
||
|
===================================================================
|
||
|
--- ptpd-ptpd-2.3.1.orig/src/dep/ntpengine/ntp_isc_md5.h
|
||
|
+++ ptpd-ptpd-2.3.1/src/dep/ntpengine/ntp_isc_md5.h
|
||
|
@@ -80,7 +80,7 @@ isc_md5_final(isc_md5_t *ctx, unsigned c
|
||
|
# define MD5Init(c) isc_md5_init(c)
|
||
|
# define MD5Update(c, p, s) isc_md5_update(c, p, s)
|
||
|
# define MD5Final(d, c) isc_md5_final((c), (d)) /* swapped */
|
||
|
- typedef MD5_CTX EVP_MD_CTX;
|
||
|
+ typedef MD5_CTX PTPD_EVP_MD_CTX;
|
||
|
# define EVP_DigestInit(c) MD5Init(c)
|
||
|
# define EVP_DigestUpdate(c, p, s) MD5Update(c, p, s)
|
||
|
# define EVP_DigestFinal(c, d, pdl) \
|