components/net-snmp/patches/001.scapi.patch
author Patrick Einheber <patrick.einheber@oracle.com>
Mon, 09 Nov 2015 09:47:32 -0800
changeset 5073 8aa7f7f76c01
parent 252 ee0fb1eabcbf
permissions -rw-r--r--
22166490 ldap provider always finds authentication_method out of sync

--- net-snmp-5.4.1/snmplib/scapi.c	Fri Sep 15 05:47:01 2006
+++ net-snmp-5.4.1.mod/snmplib/scapi.c	Sat Jul  4 02:58:34 2009
@@ -406,11 +406,11 @@
     int            rval = SNMPERR_SUCCESS;
 #endif
     int            ret;
+    unsigned int   tmp_len;
 
 #ifdef NETSNMP_USE_OPENSSL
     const EVP_MD   *hashfn;
     EVP_MD_CTX     ctx, *cptr;
-    unsigned int   tmp_len;
 #endif
 
     DEBUGTRACE;
@@ -479,13 +479,11 @@
 
 #ifndef NETSNMP_DISABLE_MD5
     if (ISTRANSFORM(hashtype, HMACMD5Auth)) {
-	rval = pkcs_digest(CKM_MD5, buf, buf_len, MAC, &tmp_len);
-        *MAC_len = tmp_len;
+	rval = pkcs_digest(CKM_MD5, buf, buf_len, MAC, MAC_len);
     } else
 #endif
         if (ISTRANSFORM(hashtype, HMACSHA1Auth)) {
-	rval = pkcs_digest(CKM_SHA_1, buf, buf_len, MAC, &tmp_len);
-        *MAC_len = tmp_len;
+	rval = pkcs_digest(CKM_SHA_1, buf, buf_len, MAC, MAC_len);
     } else {
         return (SNMPERR_GENERR);
     }