From: Bing Du <du...@mo...> - 2002-10-07 20:58:58
|
I'd appreciate anybody providing any hints or pointing me to any online sources that would be helpful for fixing my problem with start_tls. Briefly Net::LDAPS works fine but start_tls does not. More details as shown below. Net::LDAP version 0.251 Net::LDAPS version 0.03 Using start_tls with Net::LDAP: ----- #!/usr/local/bin/perl use Net::LDAP; $dn = "uid=c24b18d4bb4afdf052330678af9a601d, ou=People, dc=tamu, dc=edu"; $pw = 'mypass'; my $ldap_server = 'operator.tamu.edu'; my $ldcon = new Net::LDAP($ldap_server,version=>3) || die "Can't connect"; my $mesg = $ldcon->bind(dn => $dn,password => $pw); $mesg = $ldcon->start_tls(); print "start_tls: ",$mesg->error,"\n"; $version = $ldcon->version; print "version is $version\n"; $mesg = $ldcon->cipher(); print "cipher is ",$mesg,"\n"; ----- Outputs are: ----- start_tls: Operations error version is 3 cipher is ----- Is there any way to check if TLS is currently established on the connection? Using Net::LDAPS: ----- #!/usr/local/bin/perl use Net::LDAPS; $dn = "uid=c24b18d4bb4afdf052330678af9a601d, ou=People, dc=tamu, dc=edu"; $pw = 'gydb0711db'; my $ldap_server = 'operator.tamu.edu'; my $PEOPLE_BASEDN = "ou=people,dc=tamu,dc=edu"; my $ldcon = new Net::LDAPS($ldap_server) || die "Can't connect"; my $mesg = $ldcon->bind(dn => $dn,password => $pw, version=>3); $version = $ldcon->version; print "version is $version\n"; #$mesg = $ldcon->start_tls(); #print "start_tls: ",$mesg->error,"\n"; $mesg = $ldcon->cipher(); print "cipher is ",$mesg,"\n"; ----- Outputs (as expected) are: ----- version is 3 cipher is EXP1024-RC4-SHA ----- Bing Bing Du <bi...@ta..., 979-845-9577> Texas A&M University, CIS, Operating Systems, Unix |