[test suite] added Rijndael HMAC + RAND_PORT test
authorMichael Rash <mbr@cipherdyne.org>
Sat, 10 Aug 2013 18:27:10 +0000 (14:27 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sat, 10 Aug 2013 18:27:10 +0000 (14:27 -0400)
Makefile.am
test/conf/fwknoprc_rand_port_hmac_base64_key [new file with mode: 0644]
test/test-fwknop.pl
test/tests/rijndael_hmac.pl

index 1192e03..b6eaf50 100644 (file)
@@ -204,6 +204,7 @@ EXTRA_DIST = \
     test/conf/fwknoprc_hmac_sha512_short_key \
     test/conf/fwknoprc_hmac_sha512_long_key \
     test/conf/fwknoprc_hmac_simple_keys \
+    test/conf/fwknoprc_rand_port_hmac_base64_key \
     test/conf/fwknoprc_invalid_base64_key \
     test/conf/fwknoprc_named_key \
     test/conf/fwknoprc_with_default_base64_key \
diff --git a/test/conf/fwknoprc_rand_port_hmac_base64_key b/test/conf/fwknoprc_rand_port_hmac_base64_key
new file mode 100644 (file)
index 0000000..ef8ad94
--- /dev/null
@@ -0,0 +1,5 @@
+[default]
+HMAC_DIGEST_TYPE    sha256
+KEY_BASE64          wzNP62oPPgEc+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
+HMAC_KEY_BASE64     Yh+xizBnl6FotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
+RAND_PORT           Y
index 0c69852..40ce495 100755 (executable)
@@ -127,6 +127,7 @@ our %cf = (
     'rc_hmac_b64_key'              => "$conf_dir/fwknoprc_default_hmac_base64_key",
     'rc_hmac_sha512_b64_key'       => "$conf_dir/fwknoprc_hmac_sha512_base64_key",
     'rc_hmac_b64_key2'             => "$conf_dir/fwknoprc_hmac_key2",
+    'rc_rand_port_hmac_b64_key'    => "$conf_dir/fwknoprc_rand_port_hmac_base64_key",
     '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",
index da8b90f..edfc4ee 100644 (file)
         'key_file' => $cf{'rc_hmac_b64_key'},
         'fatal'    => $NO
     },
+    {
+        'category' => 'Rijndael+HMAC',
+        'subcategory' => 'client+server',
+        'detail'   => 'random SPA port (via rc RAND_PORT)',
+        'function' => \&spa_cycle,
+        'cmdline'  => "LD_LIBRARY_PATH=$lib_dir $valgrind_str " .
+            "$fwknopCmd -A tcp/22 -a $fake_ip -D $loopback_ip --rc-file " .
+            "$cf{'rc_rand_port_hmac_b64_key'} --verbose --verbose -r",
+        'fwknopd_cmdline'  => "LD_LIBRARY_PATH=$lib_dir $valgrind_str " .
+            "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_access'} " .
+            "-d $default_digest_file -p $default_pid_file $intf_str " .
+            qq|-P "udp"|,
+        'fw_rule_created' => $NEW_RULE_REQUIRED,
+        'fw_rule_removed' => $NEW_RULE_REMOVED,
+        'key_file' => $cf{'rc_rand_port_hmac_b64_key'},
+        'fatal'    => $NO
+    },
 
     {
         'category' => 'Rijndael+HMAC',