diff --git a/Makefile.am b/Makefile.am index 049ab4f4..8af715c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,6 +109,7 @@ EXTRA_DIST = \ python/setup.py \ python/fkomodule.c \ python/fko.py \ + test/conf/gpg_dirs_orig.tar.gz \ test/conf/client-gpg/pubring.gpg \ test/conf/client-gpg/secring.gpg \ test/conf/client-gpg/trustdb.gpg \ diff --git a/test/conf/client-gpg-no-pw/trustdb.gpg b/test/conf/client-gpg-no-pw/trustdb.gpg index be93308f..58ec2d6d 100644 Binary files a/test/conf/client-gpg-no-pw/trustdb.gpg and b/test/conf/client-gpg-no-pw/trustdb.gpg differ diff --git a/test/conf/client-gpg/trustdb.gpg b/test/conf/client-gpg/trustdb.gpg index 2c1093e7..58ec2d6d 100644 Binary files a/test/conf/client-gpg/trustdb.gpg and b/test/conf/client-gpg/trustdb.gpg differ diff --git a/test/conf/gpg_dirs_orig.tar.gz b/test/conf/gpg_dirs_orig.tar.gz new file mode 100644 index 00000000..c853ff39 Binary files /dev/null and b/test/conf/gpg_dirs_orig.tar.gz differ diff --git a/test/conf/server-gpg-no-pw/trustdb.gpg b/test/conf/server-gpg-no-pw/trustdb.gpg index 0c29e43a..d5b5b60c 100644 Binary files a/test/conf/server-gpg-no-pw/trustdb.gpg and b/test/conf/server-gpg-no-pw/trustdb.gpg differ diff --git a/test/conf/server-gpg/trustdb.gpg b/test/conf/server-gpg/trustdb.gpg index 8090303d..d5b5b60c 100644 Binary files a/test/conf/server-gpg/trustdb.gpg and b/test/conf/server-gpg/trustdb.gpg differ diff --git a/test/test-fwknop.pl b/test/test-fwknop.pl index 9d61e4a5..22639ad2 100755 --- a/test/test-fwknop.pl +++ b/test/test-fwknop.pl @@ -26,6 +26,7 @@ my $data_tmp = 'data.tmp'; my $key_tmp = 'key.tmp'; my $enc_save_tmp = 'openssl_save.enc'; my $test_suite_path = 'test-fwknop.pl'; +my $gpg_dir_orig_tar = 'gpg_dirs_orig.tar.gz'; our $gpg_client_home_dir = "$conf_dir/client-gpg"; our $gpg_client_home_dir_no_pw = "$conf_dir/client-gpg-no-pw"; our $replay_pcap_file = "$conf_dir/spa_replay.pcap"; @@ -592,6 +593,7 @@ if ($enable_valgrind) { &logr("\n"); &remove_permissions_warnings() unless $include_permissions_warnings; +&restore_gpg_dirs(); my $total_elapsed_seconds = time() - $start_time; my $total_elapsed_minutes = sprintf "%.2f", ($total_elapsed_seconds / 60); @@ -5006,6 +5008,21 @@ sub init() { return; } +sub restore_gpg_dirs() { + + my $curr_pwd = cwd() or die $!; + + chdir $conf_dir or die $!; + + if (-e $gpg_dir_orig_tar) { + system "tar xfz $gpg_dir_orig_tar > /dev/null"; + } + + chdir $curr_pwd or die $!; + + return; +} + sub openssl_hmac_style_check() { if (&run_cmd("$openssl_path dgst -hex -sha256 -mac HMAC " . "-macopt hexkey:61616161 $0", $cmd_out_tmp, $curr_test_file)) {