From: Clif H. <ch...@us...> - 2003-02-21 02:31:56
|
Update of /cvsroot/perl-ldap/ldap/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv23926/ldap/contrib Modified Files: tklkup Log Message: Added LDAPS new connection code to comprehend that Microsoft systems and ActiveState perl may not have the software installed to do SSL connections. SSL connections are currently disabled for Microsoft systems. Index: tklkup =================================================================== RCS file: /cvsroot/perl-ldap/ldap/contrib/tklkup,v retrieving revision 2.23 retrieving revision 2.24 diff -u -d -r2.23 -r2.24 --- tklkup 19 Feb 2003 02:22:13 -0000 2.23 +++ tklkup 21 Feb 2003 02:31:52 -0000 2.24 @@ -51,7 +51,7 @@ my %NC = (); $Global{'jpeg'} = 1; -eval { require Tk::JPEG; }; +eval 'require Tk::JPEG'; $Global{'jpeg'} = 0 if ( $@ ); $Global{'splash'} = 1; @@ -1793,26 +1793,30 @@ if ( $Global{port} == 636 || $Global{'setSSL'} ) { - -eval + +$bindcommand = 'require Net::LDAPS; new Net::LDAPS( $Global{LDAP_SERVER}, timeout => 1, port => $Global{port}, debug => $opt{d} ) '; + + +if ( $Global{'platform'} eq 'MSWin32') { - require Net::LDAPS; -}; +$error = "This program currently does not support SSL on Microsoft Windows systems."; +ERROR(\$error); +return 1; + +} + + +$Global{ldap} = eval $bindcommand; if ($@) { $msgbox->insert("0.0", $@) if ($@ && Tk::Exists($msgbox)) ; return -1; } -$Global{ldap} = new Net::LDAPS( $Global{'LDAP_SERVER'}, - timeout => 1, - port => $Global{'port'}, - debug => $opt{d}, - ) or $error = 1; -if ( $error ) +if ( !($Global{ldap}->isa('Net::LDAPS') ) ) { $Global{dirConnError} = "LDAPS connection error to $Global{'LDAP_SERVER'}."; -return 1; +return -1; } } |