Skip to content

Commit 0123f75

Browse files
committed
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
2 parents 8373828 + 9690ded commit 0123f75

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ PHP NEWS
5252
. Fixed bug #65825 (PDOStatement::fetch() does not throw exception on broken
5353
server connection). (Nikita)
5454

55+
- SNMP:
56+
. Fixed bug #70461 (disable md5 code when it is not supported in net-snmp).
57+
(Alexander Bergmann, cmb)
58+
5559
29 Oct 2020, PHP 7.4.12
5660

5761
- Core:

ext/snmp/snmp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,10 +1204,13 @@ static int netsnmp_session_set_sec_level(struct snmp_session *s, char *level)
12041204
Set the authentication protocol in the snmpv3 session */
12051205
static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot)
12061206
{
1207+
#ifndef DISABLE_MD5
12071208
if (!strcasecmp(prot, "MD5")) {
12081209
s->securityAuthProto = usmHMACMD5AuthProtocol;
12091210
s->securityAuthProtoLen = USM_AUTH_PROTO_MD5_LEN;
1210-
} else if (!strcasecmp(prot, "SHA")) {
1211+
} else
1212+
#endif
1213+
if (!strcasecmp(prot, "SHA")) {
12111214
s->securityAuthProto = usmHMACSHA1AuthProtocol;
12121215
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
12131216
} else {

0 commit comments

Comments
 (0)