Skip to content

Commit

Permalink
Merge pull request #641 from vlevigneron/fix-issue-zonemaster-engine-632
Browse files Browse the repository at this point in the history
Add more meaningful message for unsupported algorithms in DNSSEC test cases
  • Loading branch information
vlevigneron committed Oct 21, 2019
2 parents 270d12e + 34f707e commit 4b0ebf3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Zonemaster/Engine/Test/DNSSEC.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Zonemaster::Engine::Test::DNSSEC;

use version; our $VERSION = version->declare("v1.1.6");
use version; our $VERSION = version->declare("v1.1.7");

###
### This test module implements DNSSEC tests.
Expand Down Expand Up @@ -1372,8 +1372,8 @@ sub dnssec08 {
$ok = $sig->keytag;
}
else {
if ($sig->algorithm == 12 and $msg =~ /Unknown cryptographic algorithm/) {
$msg = 'no GOST support';
if ( $sig->algorithm >= 12 and $sig->algorithm <= 16 and $msg =~ /Unknown cryptographic algorithm/ ) {
$msg = q{no }. $algo_properties{$sig->algorithm}{description}. q{ support};
}
push @results,
info(
Expand Down Expand Up @@ -1445,8 +1445,8 @@ sub dnssec09 {
$ok = $sig->keytag;
}
else {
if ($sig->algorithm == 12 and $msg =~ /Unknown cryptographic algorithm/) {
$msg = 'no GOST support';
if ( $sig->algorithm >= 12 and $sig->algorithm <= 16 and $msg =~ /Unknown cryptographic algorithm/ ) {
$msg = q{no }. $algo_properties{$sig->algorithm}{description}. q{ support};
}
push @results,
info(
Expand Down Expand Up @@ -1690,8 +1690,8 @@ sub dnssec11 {
$pass = $tag;
}
else {
if ($sig->algorithm == 12 and $msg =~ /Unknown cryptographic algorithm/) {
$msg = 'no GOST support';
if ( $sig->algorithm >= 12 and $sig->algorithm <= 16 and $msg =~ /Unknown cryptographic algorithm/ ) {
$msg = q{no }. $algo_properties{$sig->algorithm}{description}. q{ support};
}
push @fail, "signature: $msg" ;
}
Expand Down

0 comments on commit 4b0ebf3

Please sign in to comment.