]> granicus.if.org Git - php/commitdiff
- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2 compatibi...
authorfoobar <sniper@php.net>
Wed, 26 Jul 2006 23:56:09 +0000 (23:56 +0000)
committerfoobar <sniper@php.net>
Wed, 26 Jul 2006 23:56:09 +0000 (23:56 +0000)
ext/snmp/snmp.c

index 49648907226f9ba3116d22b03b548f6e197e5ac7..e0568cec183522449c56bcc2597215652137f3cc 100644 (file)
@@ -834,10 +834,14 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot T
 * 
 * As we want this extension to compile on both versions, we use the latter
 * symbol on purpose, as it's defined to be the same as the former.
+*
+* However, in 5.2 the type of usmAES128PrivProtocol is a pointer, not an
+* array, so we cannot use the OIDSIZE macro because it uses sizeof().
+*
 */
                        || !strcasecmp(prot, "AES")) {
                        s->securityPrivProto = usmAES128PrivProtocol;
-                       s->securityPrivProtoLen = OIDSIZE(usmAES128PrivProtocol);
+                       s->securityPrivProtoLen = USM_PRIV_PROTO_AES128_LEN;
                        return (0);
 #else                  
                ) {