Hi,
after some struggle i got start_tls and SASL EXTERNAL  authentication
running, but i still get a strange warning:

Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.10.0/
Authen/SASL/Perl.pm line 130, <DATA> line 275.

Just to make it clear, a startTLS session is successfully initiated,
no complains about localhost please, this is set via subjectAltName.
The proper sasl bind operation is successful, the search result is
successful, it is just this annoying warning that bothers me.
Is there any chance to get rid of this warning?

-Dieter


,----[ perl-script ]
| use strict;
| use Net::LDAP;
| use Authen::SASL qw(Perl);
| my ($ldap,$sasl,$msg,$result,$entry);
| my $host = 'localhost';
| my $basedn = 'cn=Mailinglisten,cn=Dieter Kluenter,ou=Partner,o=avci,c=de';
| my $filter = "(cn=$ARGV[0])";
| my $scope = 'one';
| my @attrs = ("cn","ListenName","myListName","authPhrase");
| 
| my $tls_cacert = '/path/to/cacert.pem';
| my $tls_cert = '/path/to/private/cert.pem';
| my $tls_key = '/path/to/private-key.pem';
| 
| $ldap = Net::LDAP->new("$host",
|                        async => 1,
|                        version => 3,
|                         debug => 0
|                       ) or die "$@";
| $msg = $ldap->start_tls(
|        verify => 'require',
|        clientcert => "$tls_cert",
|        clientkey => "$tls_key",
|        cafile => "$tls_cacert",
|        );
|  if ( $msg->code){
| print ("error number: " . $msg->code . "\n");
| print ("error: " . $msg->error_text . "\n");
| print ("is_error: " . $msg->is_error . "\n");
|  };
| $sasl = Authen::SASL->new(
|         mechanism =>  'EXTERNAL',
|         callback => {
|                  user => '',
|  }                      
| ) or die "$@";
| $msg = $ldap->bind(  sasl => $sasl);
| if ($msg->code){print $msg->error_text};
| $result = $ldap->search(
|         base => $basedn,
|         scope => $scope,                
|         filter => $filter,
|         attrs => ["$attrs[0]","$attrs[1]","$attrs[2]","$attrs[3]" ]     
|         );
| if ( $result->code ){
| LDAPerror ( "Searching",$result );
| }
| sub LDAPerror
|         {
|         my ($from,$result) =...@_;
| print "Fehlercode: ". $result->code . "\n";
| print "Fehlertext: ". $result->error . "\n";
| }
| foreach $entry ($result->entries){
|         $entry->dump;
|       }
| $msg = $ldap->unbind;
`----

-- 
Dieter Klünter | Systemberatung
http://www.dpunkt.de/buecher/2104.html
sip: +49.180.1555.7770535
GPG Key ID:8EF7B6C6
53°08'09,95"N
10°08'02,42"E

Reply via email to