Hello, =

I'm having problems with Net-SNMP Perl module. I'm currently running version
5.3.1, with OpenSSL support enabled.
I need to use SNMPv3. Authentication and encryption support works fine with
command line tools like snmpget/snmpset and so on.
But when it comes to the Perl module, I only succeed when I use security
level no higher than noAuthNoPriv - that is, unless I don't use anything
which involves Ku calculating, everything is OK.

So, the following Perl code works:
use SNMP;
$SNMP::verbose =3D 1;
$s =3D new SNMP::Session (DestHost=3D>'localhost', Version=3D>3,

But none of the following:
use SNMP;
$SNMP::verbose =3D 1;
$s =3D new SNMP::Session (DestHost=3D>'localhost', Version=3D>3,
SecName=3D>'MyUser', SecLevel=3D>'authNoPriv', AuthProto=3D>'SHA',
use SNMP;
$SNMP::verbose =3D 1;
$s =3D new SNMP::Session (DestHost=3D>'localhost', Version=3D>3,
SecName=3D>'MyUser', SecLevel=3D>'authPriv', AuthProto=3D>'SHA',
AuthPass=3D>'mypassword', PrivProto=3D>'AES', PrivPass=3D>'myauthpass');

The error message I get (after enabling verbose):
error:snmp_new_v3_session:Error generating Ku from authentication password.
unable to create session at
c:/Software/ActiveState/ActivePerl/site/lib/SNMP.pm line 534.

I'm glancing through the code of the Perl module (SNMP.xs) and I found out
this snippet:
if (strlen(auth_pass) > 0) {
session.securityAuthKeyLen =3D USM_AUTH_KU_LEN;
if (generate_Ku(session.securityAuthProto,
(u_char *)auth_pass,
&session.securityAuthKeyLen) !=3D
if (verbose)
generating Ku from authentication password.\n");
goto end;

What's the problem with generate_Ku which causes the error? I'm not very
sure about the value USM_AUTH_KU_LEN which is assigned on the beggining of
the block - it's 20 now, should it be 20?

Anyway, is anyone experiencing similar problems?
Is there a way to help it?
Thanks in advance.

best regards,
Wiadomo=B6=E6 wys=B3ana z HornetWebmail

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Net-snmp-coders mailing list