Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have secured the https://machinename link. However, theuse LWP::UserAgent; my ($strHttpURL)='https://machinename; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET =>$strHttpURL); $res = $ua->request($req); if ($res->is_success) { print ("$strHttpURL connected successfully"); return $TRUE; } else{ print "$strHttpURL not connected"); }
2.The second problem is on the similar lines,here i have to
check whether the LDAPS server is running or not.In
windows i am able to check both the LDP and LDAPS
services. However, in UNIX the LDAP code works fine but
LDAPS again is not able to connect properly.The
following is the code snippet for LDAPS:
I think both the above problems are related.Pls help.use Net::LDAPS; use Net::LDAP; $ldaps = Net::LDAPS->new( $strLDAPIpAdd,port =>$strLDAPPort,onerror=>u +ndef); if ($ldaps==undef) { print("Ip Address of LDAP server over SSL is not correct"); return $ERROR; } $mesg = $ldaps->bind(); if ($mesg->code==0) { print ("LDAP over SSL with ip $strLDAPIpAdd connected successfully!"); $mesg=$ldaps->unbind; } else{ print("LDAP over SSL with ip $strLDAPIpAdd not connected..."); $mesg=$ldaps->unbind; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking HTTPS and LDAPS thru UNIX
by zengargoyle (Deacon) on Dec 13, 2003 at 10:53 UTC | |
by JamesNC (Chaplain) on Dec 13, 2003 at 13:19 UTC |