summaryrefslogtreecommitdiffstats
path: root/php-net-snmp.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-05-27 15:28:48 +0200
committerRemi Collet <remi@remirepo.net>2021-05-27 15:28:48 +0200
commit36f2000eeafff83af76db3a9fa0964609339cf91 (patch)
treeeed8c6101334c0bf9218a676269c1025d65f8e05 /php-net-snmp.patch
parent2bc9bc4e3cefc46e42f28cbc1bb8290ec3a6c8d8 (diff)
fix snmp extension build with net-snmp without DES
Diffstat (limited to 'php-net-snmp.patch')
-rw-r--r--php-net-snmp.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/php-net-snmp.patch b/php-net-snmp.patch
new file mode 100644
index 0000000..e9f819e
--- /dev/null
+++ b/php-net-snmp.patch
@@ -0,0 +1,38 @@
+Backported from 8.0 for 7.0 by Remi
+
+
+From f9fd3595ecb36c8dc6add0515782a18f15216d77 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 27 May 2021 14:20:07 +0200
+Subject: [PATCH] Fix snmp build without DES
+
+---
+ ext/snmp/snmp.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
+index 35d19c8738828..d31995827880d 100644
+--- a/ext/snmp/snmp.c
++++ b/ext/snmp/snmp.c
+@@ -1266,15 +1266,19 @@ static int netsnmp_session_set_auth_prot
+ Set the security protocol in the snmpv3 session */
+ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot)
+ {
++#ifndef NETSNMP_DISABLE_DES
+ if (!strcasecmp(prot, "DES")) {
+ s->securityPrivProto = usmDESPrivProtocol;
+ s->securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN;
++ } else
++#endif
+ #ifdef HAVE_AES
+- } else if (!strcasecmp(prot, "AES128") || !strcasecmp(prot, "AES")) {
++ if (!strcasecmp(prot, "AES128") || !strcasecmp(prot, "AES")) {
+ s->securityPrivProto = usmAESPrivProtocol;
+ s->securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN;
++ } else
+ #endif
+- } else {
++ {
+ php_error_docref(NULL, E_WARNING, "Unknown security protocol '%s'", prot);
+ return (-1);
+ }