summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-11-02 11:41:12 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-11-02 11:41:37 +0100
commit6fc2cab254c4331e70790c21114a6519493662f9 (patch)
tree5ccb5d920e8ade9d5f3ef08e4ef46446eb5904e7
parentcf38a6f51f204eefd7b3c9bcfa2ae95acf1fc1e6 (diff)
parent0123f75b5d5bcd76603da1acecf6687a08145b68 (diff)
downloadphp-git-6fc2cab254c4331e70790c21114a6519493662f9.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #70461: disable md5 code when it is not supported in net-snmp
-rw-r--r--NEWS4
-rw-r--r--ext/snmp/snmp.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 2f45f378c1..627913e9f7 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,10 @@ PHP NEWS
. Fixed bug #80299 (ReflectionFunction->invokeArgs confused in arguments).
(Nikita)
+- SNMP:
+ . Fixed bug #70461 (disable md5 code when it is not supported in net-snmp).
+ (Alexander Bergmann, cmb)
+
- Standard:
. Don't force rebuild of symbol table, when populating $http_response_header
variable by the HTTP stream wrapper. (Dmitry)
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index b5a81f2dd4..0925d345cc 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -934,10 +934,13 @@ static int netsnmp_session_set_sec_level(struct snmp_session *s, char *level)
Set the authentication protocol in the snmpv3 session */
static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot)
{
+#ifndef DISABLE_MD5
if (!strcasecmp(prot, "MD5")) {
s->securityAuthProto = usmHMACMD5AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN;
- } else if (!strcasecmp(prot, "SHA")) {
+ } else
+#endif
+ if (!strcasecmp(prot, "SHA")) {
s->securityAuthProto = usmHMACSHA1AuthProtocol;
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
} else {