summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-11-02 11:39:16 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-11-02 11:39:42 +0100
commit0123f75b5d5bcd76603da1acecf6687a08145b68 (patch)
tree2bcaa733f823d573afc3a171037d61b1f5c0fd8e /ext
parent83738281eb9f2577eda1c76a6acfe644d6fcc6c1 (diff)
parent9690ded288624e8ebb8f331ff305fed9a134e5e3 (diff)
downloadphp-git-0123f75b5d5bcd76603da1acecf6687a08145b68.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #70461: disable md5 code when it is not supported in net-snmp
Diffstat (limited to 'ext')
-rw-r--r--ext/snmp/snmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index f2f55d19b5..3ecd461f0c 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -1204,10 +1204,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 {