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
This commit is contained in:
Christoph M. Becker 2020-11-02 11:39:16 +01:00
commit 0123f75b5d
2 changed files with 8 additions and 1 deletions

4
NEWS
View file

@ -52,6 +52,10 @@ PHP NEWS
. Fixed bug #65825 (PDOStatement::fetch() does not throw exception on broken
server connection). (Nikita)
- SNMP:
. Fixed bug #70461 (disable md5 code when it is not supported in net-snmp).
(Alexander Bergmann, cmb)
29 Oct 2020, PHP 7.4.12
- Core:

View file

@ -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 {