use note() instead of warning()

parent b092e3ee
......@@ -34,7 +34,7 @@ my $url = URI->new($ARGV[0]);
$opt->{'handle'} ||= ($url->path_segments)[-1];
$opt->{'type'} ||= ('help' eq $opt->{'handle'} ? 'help' : ($url->path_segments)[-2]);
printf(STDERR "Testing %s, type '%s'...\n", $ARGV[0], $opt->{'type'});
note(sprintf("testing %s, type '%s'", $ARGV[0], $opt->{'type'}));
my $rdap = Net::RDAP->new(
'use_cache' => 1,
......@@ -48,6 +48,7 @@ $resolver->dnssec(1);
$resolver->adflag(1);
$resolver->nameservers($opt->{'nameserver'});
note('retrieving response from server...');
my $response = $rdap->fetch($url);
my $errors = 0;
......@@ -77,7 +78,7 @@ if ($response->isa('Net::RDAP::Error')) {
}
printf(STDERR "Completed with %d errors\n", $errors);
note(sprintf('completed with %d errors', $errors));
exit($errors);
}
......@@ -117,7 +118,7 @@ sub check_gtld_conformance {
} else {
pass('%d TLSA record(s) found for %s', scalar(@rrs), uc($url->host));
warning('TLSA record validation is not currently available');
note('TLSA record validation is not currently available');
}
}
......@@ -210,7 +211,7 @@ sub check_gtld_conformance {
}
warning('Full DNSSEC chain-of-trust validation is not currently available');
note('Full DNSSEC chain-of-trust validation is not currently available');
# TODO:
# Implementation Guide - RDAP Protocol - 1.10: RDAP servers MUST only use fully qualified domain names in RDAP responses.
......@@ -370,7 +371,7 @@ sub check_entity_conformance {
# Implementation Guide - Contact queries - 6.1: In contact ​entities​ [​RFC7483​], phone numbers MUST be inserted as ​tel properties with a ​voice​ type parameter, as specified in​ ​RFC6350​, the vCard Format Specification and its corresponding JSON mapping​ ​RFC7095​.
# Implementation Guide - Contact queries - 6.2: In contact ​entities​, fax numbers if used, MUST be inserted as ​tel​ properties with a fax​ type parameter, as specified in​ ​RFC6350​, the vCard Format Specification and its corresponding JSON mapping​ ​RFC7095​.
warning('Entity (registrar) record validation is not currently available');
note('Entity (registrar) record validation is not currently available');
}
sub check_nameserver_conformance {
......@@ -385,13 +386,18 @@ sub check_nameserver_conformance {
# Implementation Guide - Nameserver Queries - 4.2: The ​unicodeName​ member MAY be present in the response to a ​nameserver lookup.
# Implementation Guide - Nameserver Queries - 4.3: ​In the case of a Registry in which name servers are specified as domain attributes, the existence of a name server used as an attribute for an allocated domain name MUST be treated as equivalent to the existence of a host object.
warning('Nameserver record validation is not currently available');
note('Nameserver record validation is not currently available');
}
sub check_help_conformance {
my $response = shift;
warning('Help validation is not currently available');
note('Help validation is not currently available');
}
sub note {
my $fmt = shift;
printf(STDERR "%s (#%04d): %s\n", colored('NOTE', 'bold white'), (caller)[2], sprintf($fmt, @_));
}
sub pass {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment