[test suite] more command cycle tests (multiple substitution vars)

This commit is contained in:
Michael Rash 2015-10-18 09:28:48 -07:00
parent 5597730e27
commit 7a09daba4c
5 changed files with 45 additions and 1 deletions

View File

@ -191,6 +191,8 @@ EXTRA_DIST = \
test/conf/hmac_cmd_setuid_access.conf \
test/conf/hmac_cmd_giduid_access.conf \
test/conf/hmac_cmd_open_close_cycle_access.conf \
test/conf/hmac_cmd_open_close_cycle_access2.conf \
test/conf/hmac_cmd_open_close_cycle_access3.conf \
test/conf/hmac_get_key_access.conf \
test/conf/hmac_no_b64_access.conf \
test/conf/hmac_equal_keys_access.conf \

View File

@ -0,0 +1,6 @@
SOURCE ANY
KEY_BASE64 wzNP62oPPgEc+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
HMAC_KEY_BASE64 Yh+xizBnl6FotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
CMD_CYCLE_OPEN /usr/bin/touch /tmp/$IP_$PORT_$PROTOTEST
CMD_CYCLE_CLOSE /usr/bin/touch /tmp/2$IP_$PORT_$PROTOTEST
CMD_CYCLE_TIMER 1

View File

@ -0,0 +1,6 @@
SOURCE ANY
KEY_BASE64 wzNP62oPPgEc+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
HMAC_KEY_BASE64 Yh+xizBnl6FotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
CMD_CYCLE_OPEN /usr/bin/touch /tmp/$IP_$IP
CMD_CYCLE_CLOSE /usr/bin/touch /tmp/2$IP_$IP
CMD_CYCLE_TIMER 1

View File

@ -430,6 +430,8 @@ our %cf = (
'hmac_invalid_type_access' => "$conf_dir/hmac_invalid_type_access.conf",
'hmac_cygwin_access' => "$conf_dir/hmac_no_b64_cygwin_access.conf",
'hmac_cmd_open_close_cycle_access' => "$conf_dir/hmac_cmd_open_close_cycle_access.conf",
'hmac_cmd_open_close_cycle_access2' => "$conf_dir/hmac_cmd_open_close_cycle_access2.conf",
'hmac_cmd_open_close_cycle_access3' => "$conf_dir/hmac_cmd_open_close_cycle_access3.conf",
'spa_destination' => "$conf_dir/destination_rule_fwknopd.conf",
"${fw_conf_prefix}_spa_dst_snat" => "$conf_dir/${fw_conf_prefix}_spa_dst_snat_fwknopd.conf",
'hmac_spa_destination_access' => "$conf_dir/hmac_spa_destination_access.conf",
@ -4754,6 +4756,7 @@ sub spa_cmd_open_close_exec_cycle() {
$curr_test_file);
$rv = 0;
}
unlink $file if -e $file;
}
return $rv;

View File

@ -3,7 +3,7 @@
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'client+server',
'detail' => 'cmd open/close cycle',
'detail' => 'cmd open/close cycle (1)',
'function' => \&spa_cmd_open_close_exec_cycle,
'cmdline' => $default_client_hmac_args,
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_cmd_open_close_cycle_access'} " .
@ -13,4 +13,31 @@
'cmd_cycle_close_file' => '/tmp/2127.0.0.2',
'key_file' => $cf{'rc_hmac_b64_key'},
},
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'client+server',
'detail' => 'cmd open/close cycle (2)',
'function' => \&spa_cmd_open_close_exec_cycle,
'cmdline' => $default_client_hmac_args,
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_cmd_open_close_cycle_access2'} " .
"-d $default_digest_file -p $default_pid_file $intf_str",
'fw_rule_created' => $REQUIRE_NO_NEW_RULE,
'cmd_cycle_open_file' => '/tmp/127.0.0.2_22_6TEST',
'cmd_cycle_close_file' => '/tmp/2127.0.0.2_22_6TEST',
'key_file' => $cf{'rc_hmac_b64_key'},
},
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'client+server',
'detail' => 'cmd open/close cycle (3)',
'function' => \&spa_cmd_open_close_exec_cycle,
'cmdline' => $default_client_hmac_args,
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_cmd_open_close_cycle_access3'} " .
"-d $default_digest_file -p $default_pid_file $intf_str",
'fw_rule_created' => $REQUIRE_NO_NEW_RULE,
'cmd_cycle_open_file' => '/tmp/127.0.0.2_127.0.0.2',
'cmd_cycle_close_file' => '/tmp/2127.0.0.2_127.0.0.2',
'key_file' => $cf{'rc_hmac_b64_key'},
},
);