mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Update JSON id for chain-of-trust
This commit is contained in:
parent
df64e47fb9
commit
59002c1088
@ -53,7 +53,7 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
|||||||
like($out, qr/Chain of trust.*?NOT ok.*\(self signed\)/,"Chain of trust should fail because of self signed"); $tests++;
|
like($out, qr/Chain of trust.*?NOT ok.*\(self signed\)/,"Chain of trust should fail because of self signed"); $tests++;
|
||||||
$found = 0;
|
$found = 0;
|
||||||
foreach my $f ( @$json ) {
|
foreach my $f ( @$json ) {
|
||||||
if ( $f->{id} eq "trust" ) {
|
if ( $f->{id} eq "chain_of_trust" ) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
like($f->{finding},qr/^All certificate trust checks failed/,"Finding says certificate cannot be trusted."); $tests++;
|
like($f->{finding},qr/^All certificate trust checks failed/,"Finding says certificate cannot be trusted."); $tests++;
|
||||||
is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
||||||
@ -65,7 +65,7 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
|||||||
like($okout, qr/Chain of trust[^\n]*?Ok/,"Chain of trust should be ok"); $tests++;
|
like($okout, qr/Chain of trust[^\n]*?Ok/,"Chain of trust should be ok"); $tests++;
|
||||||
$found = 0;
|
$found = 0;
|
||||||
foreach my $f ( @$okjson ) {
|
foreach my $f ( @$okjson ) {
|
||||||
if ( $f->{id} eq "trust" ) {
|
if ( $f->{id} eq "chain_of_trust" ) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
is($f->{finding},"All certificate trust checks passed.","Finding says certificate can be trusted."); $tests++;
|
is($f->{finding},"All certificate trust checks passed.","Finding says certificate can be trusted."); $tests++;
|
||||||
is($f->{severity}, "OK", "Severity should be OK"); $tests++;
|
is($f->{severity}, "OK", "Severity should be OK"); $tests++;
|
||||||
@ -97,7 +97,7 @@ like($out, qr/Chain of trust.*?NOT ok\s+\(chain incomplete\)/,"Chain of trust sh
|
|||||||
$json = json('tmp.json');
|
$json = json('tmp.json');
|
||||||
$found = 0;
|
$found = 0;
|
||||||
foreach my $f ( @$json ) {
|
foreach my $f ( @$json ) {
|
||||||
if ( $f->{id} eq "trust" ) {
|
if ( $f->{id} eq "chain_of_trust" ) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
|
like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
|
||||||
is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
||||||
@ -115,7 +115,7 @@ is($found,1,"We had a finding for this in the JSON output"); $tests++;
|
|||||||
#$json = json('tmp.json');
|
#$json = json('tmp.json');
|
||||||
#$found = 0;
|
#$found = 0;
|
||||||
#foreach my $f ( @$json ) {
|
#foreach my $f ( @$json ) {
|
||||||
# if ( $f->{id} eq "trust" ) {
|
# if ( $f->{id} eq "chain_of_trust" ) {
|
||||||
# $found = 1;
|
# $found = 1;
|
||||||
# like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
|
# like($f->{finding},qr/^All certificate trust checks failed.*incomplete/,"Finding says certificate cannot be trusted."); $tests++;
|
||||||
# is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
# is($f->{severity}, "NOT ok", "Severity should be NOT ok"); $tests++;
|
||||||
@ -132,4 +132,4 @@ sub json($) {
|
|||||||
$file = `cat $file`;
|
$file = `cat $file`;
|
||||||
unlink $file;
|
unlink $file;
|
||||||
return from_json($file);
|
return from_json($file);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user