hi everybody,

did someone try to use 3des encryption ?
i wrote a little test program and all auth-priv combinations work except 
3des

i found a public site for testing
http://snmpsim.sourceforge.net/public-snmp-simulator.html

and here is my little program
i think there is something wrong in the 3des encryption

thanks in advance
k1


***
var
   snmp : TSNMPSend;
   user : String;
begin
    snmp := TSNMPSend.Create;
    snmp.Query.Clear;
    snmp.Query.Version := 3;
    snmp.Query.Flags := AuthPriv;
    snmp.Query.FlagReportable := True;

    user := 'usr-';
    case cbAuth.ItemIndex of
      0: begin
           snmp.Query.AuthMode := AuthMD5;
           user := user + 'md5-';
         end;
      1: begin
           snmp.Query.AuthMode := AuthSHA1;
           user := user + 'sha-';
         end;
    end;
    case cbPriv.ItemIndex of
      0: begin
           snmp.Query.PrivMode := PrivDES;
           user := user + 'des';
         end;
      1: begin
           snmp.Query.PrivMode := Priv3DES;
           user := user + '3des';
         end;
      2: begin
           snmp.Query.PrivMode := PrivAES;
           user := user + 'aes';
         end;
    end;

    snmp.Query.UserName := user; // 'usr-md5-aes';

    snmp.Query.Password := 'authkey1';
    snmp.Query.PrivPassword := 'privkey1';

    snmp.TargetHost := eIP.Text;
    snmp.Query.PDUType := PDUGetRequest;

    snmp.Query.MIBAdd( eOID.Text, '', asn1util.ASN1_NULL );
    if snmp.SendRequest = True then
      Memo1.Lines.Add( 'Ok : ' + snmp.Reply.MIBByIndex( 0 ).OID + ' - ' + 
snmp.Reply.MIBByIndex( 0 ).Value )
    else
      Memo1.Lines.Add( 'Fail' );

***

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to