From d569d5b1213c00a13446dbf7ffc244dfa4246b3b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 24 Feb 2017 08:19:02 +0100 Subject: [PATCH] Add Sync Server SSL configuration parameters to Config.pm. --- pandora_server/lib/PandoraFMS/Config.pm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index bccb2439e1..862dbc5531 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -261,9 +261,12 @@ sub pandora_load_config { $pa_config->{"translate_enterprise_strings"} = 1; # 5.1 $pa_config->{"syncserver"} = 0; # 7.0 $pa_config->{"sync_address"} = ''; # 7.0 + $pa_config->{"sync_ca"} = ''; # 7.0 + $pa_config->{"sync_cert"} = ''; # 7.0 + $pa_config->{"sync_key"} = ''; # 7.0 $pa_config->{"sync_port"} = '41121'; # 7.0 - $pa_config->{"sync_timeout"} = 5; # 7.0 $pa_config->{"sync_retries"} = 2; # 7.0 + $pa_config->{"sync_timeout"} = 5; # 7.0 # Internal MTA for alerts, each server need its own config. $pa_config->{"mta_address"} = '127.0.0.1'; # Introduced on 2.0 @@ -936,15 +939,24 @@ sub pandora_load_config { elsif ($parametro =~ m/^sync_address\s+(.*)/i) { $pa_config->{'sync_address'}= clean_blank($1); } + elsif ($parametro =~ m/^sync_ca\s+(.*)/i) { + $pa_config->{'sync_ca'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_cert\s+(.*)/i) { + $pa_config->{'sync_cert'}= clean_blank($1); + } + elsif ($parametro =~ m/^sync_key\s+(.*)/i) { + $pa_config->{'sync_key'}= clean_blank($1); + } elsif ($parametro =~ m/^sync_port\s+([0-9]*)/i) { $pa_config->{'sync_port'}= clean_blank($1); } - elsif ($parametro =~ m/^sync_retries\s+([0-9]*)/i) { - $pa_config->{'sync_retries'}= clean_blank($1); - } elsif ($parametro =~ m/^sync_timeout\s+([0-9]*)/i) { $pa_config->{'sync_timeout'}= clean_blank($1); } + elsif ($parametro =~ m/^sync_retries\s+([0-9]*)/i) { + $pa_config->{'sync_retries'}= clean_blank($1); + } } # end of loop for parameter # # Set to RDBMS' standard port