Hello, I finally figured out why my call to generate_ku for authPriv is failing:
It is this code snippet in keytools.c: ---------- /* * Setup for the transform type. */ #ifdef USE_OPENSSL #ifndef DISABLE_MD5 if (ISTRANSFORM(hashtype, HMACMD5Auth)) EVP_DigestInit(ctx, EVP_md5()); else #endif if (ISTRANSFORM(hashtype, HMACSHA1Auth)) EVP_DigestInit(ctx, EVP_sha1()); else { free(ctx); return (SNMPERR_GENERR); } #else MDbegin(&MD); #endif /* USE_OPENSSL */ ---------- It would appear that there is NO support for authPriv via the programming interface....interestingly enough, it works (i.e., DES) from the command line interface! SO what gives? I checked the CVS and I seem to have the current version of keytools.c. H-E-L-P!! Thanks! --daulat -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of M.Daulat Rai Sent: Friday, April 14, 2006 10:29 AM To: Net-snmp-users@lists.sourceforge.net Subject: encryption generation errors Hello All, I can run a "c" program with authNoPriv successfully; I modified it to use "authPriv" and the generate_ku() function fails. Here is the relevant code snippet: ---------------- cnst char *our_v3_passphrase = "The Net-SNMP Demo Password"; /* set the encryption method to DES */ session.securityPrivProto = usmDESPrivProtocol; session.securityPrivProtoLen = sizeof(usmDESPrivProtocol)/sizeof(oid); session.securityPrivKeyLen = USM_PRIV_KU_LEN; /* set the encryption to a DES encrypted version of our passphrase */ if (generate_Ku(session.securityPrivProto, session.securityPrivProtoLen, (u_char *) our_v3_passphrase, strlen(our_v3_passphrase), session.securityPrivKey, &session.securityPrivKeyLen) != SNMPERR_SUCCESS) { ========== Please note the following command works: snmpget -v 3 -u MD5DESUser -a MD5 -A "The Net-SNMP Demo Password" -x DES -X "The Net-SNMP Demo Password" -l authPriv test.net-snmp.org system Please help! What I am missing in my call? Thanks! --daulat ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users