summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-06-24 12:00:09 -0700
committerKhem Raj <raj.khem@gmail.com>2018-06-25 10:23:33 -0700
commit872399c7512952dc8bd9fcc45c0d90322c54968f (patch)
tree8cc13626962d7740de3c75ae2738ce192e4a0b59 /meta-networking/recipes-protocols
parentbadb14da1691cd14f5ba7ca54631bda30ed26194 (diff)
downloadmeta-openembedded-872399c7512952dc8bd9fcc45c0d90322c54968f.tar.gz
net-snmp: Refresh openssl support patch
Avoid fuzz warnings Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch50
1 files changed, 30 insertions, 20 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch
index 53bc37226..5c6436c34 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-openssl-build-errors.patch
@@ -5,8 +5,10 @@ OpenSSL 1.0.x and 1.1.x.
5 5
6Author: Sharmila Podury <sharmila.podury@brocade.com> 6Author: Sharmila Podury <sharmila.podury@brocade.com>
7 7
8--- a/apps/snmpusm.c 8Index: net-snmp-5.7.3/apps/snmpusm.c
9+++ b/apps/snmpusm.c 9===================================================================
10--- net-snmp-5.7.3.orig/apps/snmpusm.c
11+++ net-snmp-5.7.3/apps/snmpusm.c
10@@ -125,6 +125,32 @@ char *usmUserPublic_val = NULL 12@@ -125,6 +125,32 @@ char *usmUserPublic_val = NULL
11 int docreateandwait = 0; 13 int docreateandwait = 0;
12 14
@@ -85,10 +87,12 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
85 87
86 key_len = DH_size(dh); 88 key_len = DH_size(dh);
87 if (!key_len) { 89 if (!key_len) {
88--- a/configure.d/config_os_libs2 90Index: net-snmp-5.7.3/configure.d/config_os_libs2
89+++ b/configure.d/config_os_libs2 91===================================================================
90@@ -327,10 +327,16 @@ if test "x$tryopenssl" != "xno" -a "x$tr 92--- net-snmp-5.7.3.orig/configure.d/config_os_libs2
91 [[#include <openssl/evp.h>]]) 93+++ net-snmp-5.7.3/configure.d/config_os_libs2
94@@ -293,10 +293,16 @@ if test "x$tryopenssl" != "xno" -a "x$tr
95 [Define to 1 if you have the `AES_cfb128_encrypt' function.]))
92 96
93 AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create, 97 AC_CHECK_LIB(${CRYPTO}, EVP_MD_CTX_create,
94- AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [], 98- AC_DEFINE([HAVE_EVP_MD_CTX_CREATE], [],
@@ -106,9 +110,11 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
106 fi 110 fi
107 if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then 111 if echo " $transport_result_list " | $GREP "DTLS" > /dev/null; then
108 AC_CHECK_LIB(ssl, DTLSv1_method, 112 AC_CHECK_LIB(ssl, DTLSv1_method,
109--- a/include/net-snmp/net-snmp-config.h.in 113Index: net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in
110+++ b/include/net-snmp/net-snmp-config.h.in 114===================================================================
111@@ -164,6 +164,12 @@ 115--- net-snmp-5.7.3.orig/include/net-snmp/net-snmp-config.h.in
116+++ net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in
117@@ -155,6 +155,12 @@
112 /* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */ 118 /* Define to 1 if you have the `EVP_MD_CTX_destroy' function. */
113 #undef HAVE_EVP_MD_CTX_DESTROY 119 #undef HAVE_EVP_MD_CTX_DESTROY
114 120
@@ -121,11 +127,13 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
121 /* Define if you have EVP_sha224/256 in openssl */ 127 /* Define if you have EVP_sha224/256 in openssl */
122 #undef HAVE_EVP_SHA224 128 #undef HAVE_EVP_SHA224
123 129
124--- a/snmplib/keytools.c 130Index: net-snmp-5.7.3/snmplib/keytools.c
125+++ b/snmplib/keytools.c 131===================================================================
126@@ -176,7 +176,9 @@ generate_Ku(const oid * hashtype, u_int 132--- net-snmp-5.7.3.orig/snmplib/keytools.c
127 QUITFUN(SNMPERR_GENERR, generate_Ku_quit); 133+++ net-snmp-5.7.3/snmplib/keytools.c
128 } 134@@ -149,7 +149,9 @@ generate_Ku(const oid * hashtype, u_int
135 */
136 #ifdef NETSNMP_USE_OPENSSL
129 137
130-#ifdef HAVE_EVP_MD_CTX_CREATE 138-#ifdef HAVE_EVP_MD_CTX_CREATE
131+#ifdef HAVE_EVP_MD_CTX_NEW 139+#ifdef HAVE_EVP_MD_CTX_NEW
@@ -134,7 +142,7 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
134 ctx = EVP_MD_CTX_create(); 142 ctx = EVP_MD_CTX_create();
135 #else 143 #else
136 ctx = malloc(sizeof(*ctx)); 144 ctx = malloc(sizeof(*ctx));
137@@ -278,7 +280,9 @@ generate_Ku(const oid * hashtype, u_int 145@@ -258,7 +260,9 @@ generate_Ku(const oid * hashtype, u_int
138 memset(buf, 0, sizeof(buf)); 146 memset(buf, 0, sizeof(buf));
139 #ifdef NETSNMP_USE_OPENSSL 147 #ifdef NETSNMP_USE_OPENSSL
140 if (ctx) { 148 if (ctx) {
@@ -145,10 +153,12 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
145 EVP_MD_CTX_destroy(ctx); 153 EVP_MD_CTX_destroy(ctx);
146 #else 154 #else
147 EVP_MD_CTX_cleanup(ctx); 155 EVP_MD_CTX_cleanup(ctx);
148--- a/snmplib/scapi.c 156Index: net-snmp-5.7.3/snmplib/scapi.c
149+++ b/snmplib/scapi.c 157===================================================================
150@@ -627,7 +627,9 @@ sc_hash(const oid * hashtype, size_t has 158--- net-snmp-5.7.3.orig/snmplib/scapi.c
151 return SNMPERR_GENERR; 159+++ net-snmp-5.7.3/snmplib/scapi.c
160@@ -488,7 +488,9 @@ sc_hash(const oid * hashtype, size_t has
161 }
152 162
153 /** initialize the pointer */ 163 /** initialize the pointer */
154-#ifdef HAVE_EVP_MD_CTX_CREATE 164-#ifdef HAVE_EVP_MD_CTX_CREATE
@@ -158,7 +168,7 @@ Author: Sharmila Podury <sharmila.podury@brocade.com>
158 cptr = EVP_MD_CTX_create(); 168 cptr = EVP_MD_CTX_create();
159 #else 169 #else
160 cptr = malloc(sizeof(*cptr)); 170 cptr = malloc(sizeof(*cptr));
161@@ -648,7 +650,9 @@ sc_hash(const oid * hashtype, size_t has 171@@ -509,7 +511,9 @@ sc_hash(const oid * hashtype, size_t has
162 /** do the final pass */ 172 /** do the final pass */
163 EVP_DigestFinal(cptr, MAC, &tmp_len); 173 EVP_DigestFinal(cptr, MAC, &tmp_len);
164 *MAC_len = tmp_len; 174 *MAC_len = tmp_len;