{
'category' => 'Rijndael SPA',
'subcategory' => 'client+server',
- 'detail' => 'replay detection (Rijndael prefix)',
+ 'detail' => 'detect replay #1 (Rijndael prefix)',
'err_msg' => 'could not detect replay attack',
'function' => \&replay_detection,
'pkt_prefix' => 'U2FsdGVkX1',
{
'category' => 'Rijndael SPA',
'subcategory' => 'client+server',
- 'detail' => 'replay detection (Rijndael prefix)',
+ 'detail' => 'detect replay #2 (Rijndael prefix)',
'err_msg' => 'could not detect replay attack',
'function' => \&replay_detection,
'pkt_prefix' => 'U2FsdGVkX1',
{
'category' => 'GPG (no pw) SPA',
'subcategory' => 'client+server',
- 'detail' => 'replay detection (GnuPG prefix)',
+ 'detail' => 'detect replay #1 (GnuPG prefix)',
'err_msg' => 'could not detect replay attack',
'function' => \&replay_detection,
'pkt_prefix' => 'hQ',
{
'category' => 'GnuPG (GPG) SPA',
'subcategory' => 'client+server',
- 'detail' => 'replay detection (GnuPG prefix)',
+ 'detail' => 'detect replay #2 (GnuPG prefix)',
'err_msg' => 'could not detect replay attack',
'function' => \&replay_detection,
'pkt_prefix' => 'hQ',
{
'category' => 'GnuPG (GPG) SPA',
'subcategory' => 'client+server',
- 'detail' => 'replay detection (GnuPG prefix)',
+ 'detail' => 'detect replay #3 (GnuPG prefix)',
'err_msg' => 'could not detect replay attack',
'function' => \&replay_detection,
'pkt_prefix' => 'hQ',
}
}
+ ### make sure test message strings are unique across all tests
+ my %uniq_test_msgs = ();
+ for my $test_hr (@tests) {
+ my $msg = "[$test_hr->{'category'}]";
+ $msg .= " [$test_hr->{'subcategory'}]" if $test_hr->{'subcategory'};
+ $msg .= " $test_hr->{'detail'}";
+ if (defined $uniq_test_msgs{$msg}) {
+ die "[*] Duplicate test message: $msg\n";
+ } else {
+ $uniq_test_msgs{$msg} = '';
+ }
+ }
+
### make sure no fwknopd instance is currently running
die "[*] Please stop the running fwknopd instance."
if &is_fwknopd_running();