Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 72587a18 authored by Jeremy PETIT's avatar Jeremy PETIT
Browse files

Recommit important ssl initialization for the fie

parent 4307fef4
No related branches found
No related tags found
No related merge requests found
......@@ -14,12 +14,30 @@ use Net::LDAP;
use File::Copy;
use File::Basename;
use Sys::Hostname;
use Sys::Hostname::Long;
use IO::Socket::SSL;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
my $SERVER = 'SERVER';
if ( $] eq '5.020002' ) {
# jessie
$SERVER = 'SERVER';
} else {
$SERVER = 'SERVER_PROXY';
# set some variables in order to disable SSL certificate check due to stunnel
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
$ENV{HTTPS_DEBUG} = 1;
IO::Socket::SSL::set_ctx_defaults( SSL_verifycn_scheme => 'www',
SSL_verify_mode => 0 );
}
# unbuffered output:
$| = 1;
use lib ( new Config::IniFiles( -file => "/opt/etc/ini/global.ini" )->val( 'APPLICATION', 'LIBRARY' ) );
BEGIN {
my $iniFile = new Config::IniFiles( -file => "/opt/etc/ini/global.ini" );
push( @INC, $iniFile->val( 'APPLICATION', 'LIBRARY' ) );
......@@ -29,14 +47,20 @@ use SNET::common;
use SNET::snmpd;
use SNET::LdapNS qw(:all);
use SNET::libsoap;
## load the Proteus API
use Proteus::API;
use Proteus::SNET;
use vars qw($verbose $debug $help $force $cli_mode $dry_run );
use vars qw($verbose $debug $help $script $cli_mode $force $dry_run );
$verbose = 0;
$debug = 0;
$cli_mode = 1;
my $PROGNAME = basename( $0 );
$PROGNAME =~ s/\.p[lm]$//;
( $script ) = split( /\./, basename( $0 ) );
my $hostname = hostname();
my $fqdn = hostname_long();
my %options = (
"help" => \$help,
......@@ -270,7 +294,7 @@ my $proteusUser = $PiniFile->val( 'PROTEUS_SOAP', 'USER' );
print "error value of proteusUser is undefined" if ( !defined( $proteusUser ) );
my $proteusPass = $PiniFile->val( 'PROTEUS_SOAP', 'PASSWORD' );
print "error value of proteusPass is undefined" if ( !defined( $proteusPass ) );
my $proteusServer = $PiniFile->val( 'PROTEUS_SOAP', 'SERVER' );
my $proteusServer = $PiniFile->val( 'PROTEUS_SOAP', $SERVER );
print "error value of proteusDbServer is undefined" if ( !defined( $proteusServer ) );
my $Proteus_cfg_name = $PiniFile->val( 'GLOBAL', 'CONFIG' );
print "error value of Proteus_cfg_name is undefined" if ( !defined( $Proteus_cfg_name ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment