Hello,
I don't know if this belongs in the users list or the coders, since the problem I am
having is with "coding" I am sending to the coders list….
I generated the net-snmp windows binaries with SDK and OpenSSL enabled.
I can run the following command from windows command prompt successfully.
====
snmpget -v 3 -u MD5User -a MD5 -A "The Net-SNMP Demo Password" -l authNoPriv test.net-snmp.org system.sysUpTime.0
====
When I try to replicate the above programmatically using MS VC++, I get an "Error generating Ku from authentication
pass phrase".
I have done google searches and read various posting but I just can't seem to get a handle on
this problem.
Here is the relevant code snippet:
===
const char *our_v3_passphrase = "The Net-SNMP Demo Password";
session.securityAuthProto = usmHMACMD5AuthProtocol;
session.securityAuthProtoLen = sizeof(usmHMACMD5AuthProtocol)/sizeof(oid);
session.securityAuthKeyLen = USM_AUTH_KU_LEN;
if (generate_Ku(session.securityAuthProto,
session.securityAuthProtoLen,
(u_char *) our_v3_passphrase, strlen(our_v3_passphrase),
session.securityAuthKey,
&session.securityAuthKeyLen) != SNMPERR_SUCCESS) {
….
====
Please help!! I am willing to read and learn but I need some mentoring!!
Thanks!
--daulat
:
