Search
j0ke.net Open Build Service
>
Projects
>
home:netmax
:
rebuilds
>
php4
> php-4.3.9-netsnmp52-aes.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-4.3.9-netsnmp52-aes.patch of Package php4
--- php-4.3.9/ext/snmp/snmp.c.orig 2004-02-03 06:44:17.000000000 -0800 +++ php-4.3.9/ext/snmp/snmp.c 2004-12-06 01:35:23.737394504 -0800 @@ -17,6 +17,7 @@ | Steven Lawrance <slawrance@technologist.com> | | Harrie Hazewinkel <harrie@lisanza.net> | | Johann Hanne <jonny@nurfuerspam.de> | + | Robin Johnson <robbat2@gentoo.org> | +----------------------------------------------------------------------+ */ @@ -769,18 +770,20 @@ static int netsnmp_session_set_sec_proto s->securityPrivProtoLen = OIDSIZE(usmDESPrivProtocol); return (0); #ifdef HAVE_AES - } else if (!strcasecmp(prot, "AES128")) { +/* + * In Net-SNMP before 5.2, the following symbols exist: + * usmAES128PrivProtocol, usmAES192PrivProtocol, usmAES256PrivProtocol + * In an effort to be more standards-compliant, 5.2 removed the last two. + * As of 5.2, the symbols are: + * usmAESPrivProtocol, usmAES128PrivProtocol + * + * 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. + */ + } else if (!strcasecmp(prot, "AES128") || !strcasecmp(prot, "AES")) { s->securityPrivProto = usmAES128PrivProtocol; s->securityPrivProtoLen = OIDSIZE(usmAES128PrivProtocol); return (0); - } else if (!strcasecmp(prot, "AES192")) { - s->securityPrivProto = usmAES192PrivProtocol; - s->securityPrivProtoLen = OIDSIZE(usmAES192PrivProtocol); - return (0); - } else if (!strcasecmp(prot, "AES256")) { - s->securityPrivProto = usmAES256PrivProtocol; - s->securityPrivProtoLen = OIDSIZE(usmAES256PrivProtocol); - return (0); #endif } else if (strlen(prot)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid privacy protocol: %s", prot);