[test suite] added tests for KEY synonym GPG_SIGNING_PW

This commit is contained in:
Michael Rash 2013-06-19 23:41:37 -04:00
parent 54c26ede6e
commit 13626a2a74
6 changed files with 54 additions and 3 deletions

View File

@ -0,0 +1,2 @@
[default]
GPG_SIGNING_PW fwknoptest

View File

@ -0,0 +1,7 @@
[default]
[testssh]
GPG_SIGNING_PW fwknoptest
[testssh2]
GPG_SIGNING_PW_BASE64 Zndrbm9wdGVzdA==

View File

@ -116,6 +116,8 @@ our %cf = (
'rc_invalid_b64_key' => "$conf_dir/fwknoprc_invalid_base64_key",
'rc_hmac_b64_key' => "$conf_dir/fwknoprc_default_hmac_base64_key",
'rc_hmac_b64_key2' => "$conf_dir/fwknoprc_hmac_key2",
'rc_gpg_signing_pw' => "$conf_dir/fwknoprc_gpg_signing_pw",
'rc_gpg_named_signing_pw' => "$conf_dir/fwknoprc_named_gpg_signing_pw",
'rc_gpg_hmac_b64_key' => "$conf_dir/fwknoprc_gpg_hmac_key",
'rc_gpg_args_hmac_b64_key' => "$conf_dir/fwknoprc_gpg_args_hmac_key",
'rc_gpg_args_no_pw_hmac_b64_key' => "$conf_dir/fwknoprc_gpg_args_no_pw_hmac_key",

View File

@ -757,9 +757,9 @@
'detail' => 'encryption mode Asymmetric',
'function' => \&generic_exec,
'cmdline' => $default_client_args . " --test --encryption-mode \"Asymmetric\"",
'positive_output_matches' => [qr/Encryption\sMode\:\s.*Asymmetric/],
'positive_output_matches' => [qr/Must\sspecify\sGPG\srecipient/],
'fatal' => $NO
},
},
{
'category' => 'basic operations',
'subcategory' => 'client',

View File

@ -33,6 +33,19 @@
'key_file' => $cf{'rc_def_key'},
'fatal' => $NO
},
{
'category' => 'GPG',
'subcategory' => 'client+server',
'detail' => 'rc file default key ..._PW synonym',
'function' => \&spa_cycle,
'cmdline' => "$default_client_gpg_args_no_get_key " .
"--rc-file $cf{'rc_gpg_signing_pw'}",
'fwknopd_cmdline' => $default_server_gpg_args,
'fw_rule_created' => $NEW_RULE_REQUIRED,
'fw_rule_removed' => $NEW_RULE_REMOVED,
'key_file' => $cf{'rc_gpg_signing_pw'},
'fatal' => $NO
},
{
'category' => 'GPG',
'subcategory' => 'client+server',
@ -46,6 +59,33 @@
'key_file' => $cf{'rc_named_key'},
'fatal' => $NO
},
{
'category' => 'GPG',
'subcategory' => 'client+server',
'detail' => 'rc file named key ..._PW synonym',
'function' => \&spa_cycle,
'cmdline' => "$default_client_gpg_args_no_get_key " .
"--rc-file $cf{'rc_gpg_named_signing_pw'} -n testssh",
'fwknopd_cmdline' => $default_server_gpg_args,
'fw_rule_created' => $NEW_RULE_REQUIRED,
'fw_rule_removed' => $NEW_RULE_REMOVED,
'key_file' => $cf{'rc_gpg_named_signing_pw'},
'fatal' => $NO
},
{
'category' => 'GPG',
'subcategory' => 'client+server',
'detail' => 'rc file b64 named key ..._PW synonym',
'function' => \&spa_cycle,
'cmdline' => "$default_client_gpg_args_no_get_key " .
"--rc-file $cf{'rc_gpg_named_signing_pw'} -n testssh2",
'fwknopd_cmdline' => $default_server_gpg_args,
'fw_rule_created' => $NEW_RULE_REQUIRED,
'fw_rule_removed' => $NEW_RULE_REMOVED,
'key_file' => $cf{'rc_gpg_named_signing_pw'},
'fatal' => $NO
},
{
'category' => 'GPG',
'subcategory' => 'client+server',

View File

@ -108,7 +108,7 @@
'function' => \&spa_cycle,
'cmdline' => "LD_LIBRARY_PATH=$lib_dir $valgrind_str " .
"$fwknopCmd -A tcp/60001 -a $fake_ip -D $loopback_ip " .
"--gpg-no-singing-pw --verbose --verbose " .
"--gpg-no-signing-pw --verbose --verbose " .
"--gpg-recipient-key $gpg_server_key " .
"--gpg-signer-key $gpg_client_key " .
"--gpg-home-dir $gpg_client_home_dir_no_pw",