encryption generation errors

"M.Daulat Rai" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Sita Enterprises, Inc.
Message-ID <010e01c65f80$26544f70$0301a8c0@anjani>
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.