From cf84f016a38c0d630f7d3d832075111a10cbc420 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sun, 30 Nov 2014 21:37:42 -0500 Subject: [PATCH] [test suite] add complete cycle DESTINATION test --- Makefile.am | 1 + test/conf/hmac_spa_destination_access.conf | 5 +++++ test/test-fwknop.pl | 2 ++ test/tests/rijndael_hmac.pl | 13 +++++++++++++ 4 files changed, 21 insertions(+) create mode 100644 test/conf/hmac_spa_destination_access.conf diff --git a/Makefile.am b/Makefile.am index d9cda93e..21ea41f2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -315,6 +315,7 @@ EXTRA_DIST = \ test/conf/ipt_snat_no_translate_ip_fwknopd.conf \ test/conf/firewd_snat_no_translate_ip_fwknopd.conf \ test/conf/destination_rule_fwknopd.conf \ + test/conf/hmac_spa_destination_access.conf \ test/conf/spa_replay.pcap \ test/conf/fcs_spa.pcap \ test/fko-wrapper/Makefile \ diff --git a/test/conf/hmac_spa_destination_access.conf b/test/conf/hmac_spa_destination_access.conf new file mode 100644 index 00000000..23d656de --- /dev/null +++ b/test/conf/hmac_spa_destination_access.conf @@ -0,0 +1,5 @@ +SOURCE ANY +DESTINATION ANY +KEY_BASE64 wzNP62oPPgEc+kXDPQLHPOayQBuNbYUTPP+QrErNDmg= +HMAC_KEY_BASE64 Yh+xizBnl6FotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg== +FW_ACCESS_TIMEOUT 3 diff --git a/test/test-fwknop.pl b/test/test-fwknop.pl index 686c2f54..4ae5c576 100755 --- a/test/test-fwknop.pl +++ b/test/test-fwknop.pl @@ -388,6 +388,8 @@ our %cf = ( 'hmac_simple_keys_access' => "$conf_dir/hmac_simple_keys_access.conf", 'hmac_invalid_type_access' => "$conf_dir/hmac_invalid_type_access.conf", 'hmac_cygwin_access' => "$conf_dir/hmac_no_b64_cygwin_access.conf", + 'spa_destnation' => "$conf_dir/destination_rule_fwknopd.conf", + 'hmac_spa_destination_access' => "$conf_dir/hmac_spa_destination_access.conf", 'exp_access' => "$conf_dir/expired_stanza_access.conf", 'future_exp_access' => "$conf_dir/future_expired_stanza_access.conf", 'exp_epoch_access' => "$conf_dir/expired_epoch_stanza_access.conf", diff --git a/test/tests/rijndael_hmac.pl b/test/tests/rijndael_hmac.pl index 3f466abc..e69f8491 100644 --- a/test/tests/rijndael_hmac.pl +++ b/test/tests/rijndael_hmac.pl @@ -83,6 +83,19 @@ 'key_file' => $cf{'rc_hmac_b64_key'}, 'client_cycles_per_server_instance' => 3, }, + { + 'category' => 'Rijndael+HMAC', + 'subcategory' => 'client+server', + 'detail' => 'complete cycle DESTINATION', + 'function' => \&spa_cycle, + 'cmdline' => $default_client_hmac_args, + 'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'spa_destnation'} -a $cf{'hmac_access'} " . + "-d $default_digest_file -p $default_pid_file $intf_str", + 'fw_rule_created' => $NEW_RULE_REQUIRED, + 'fw_rule_removed' => $NEW_RULE_REMOVED, + 'key_file' => $cf{'rc_hmac_b64_key'}, + 'server_positive_output_matches' => [qr/\b$fake_ip\s.*$loopback_ip\b/], + }, { 'category' => 'Rijndael+HMAC',