implemented --disable-cache

parent aeb3af2e
......@@ -25,6 +25,8 @@ DNSSEC-related tests, the server SHOULD be a validating resolver.
installed you can use a SOCKS proxy by givin the URL the `socks://` scheme.
- `--debug` - enable debug mode (i.e. print HTTP and DNS requests and
responsees).
- `--disable-cache` - bypass [Net::RDAP](https://metacpan.org/pod/Net::RDAP)'s built-in cache and always
query the server directly.
- `--help` - show this help.
# COPYRIGHT
......
......@@ -26,6 +26,7 @@ GetOptions(
'debug',
'nameserver=s',
'proxy=s',
'disable-cache',
);
pod2usage() if ($opt->{'help'});
......@@ -39,8 +40,8 @@ $opt->{'type'} ||= ('help' eq $opt->{'handle'} ? 'help' : ($url->path_segments
note(sprintf("testing %s, type '%s'", $ARGV[0], $opt->{'type'}));
my $rdap = Net::RDAP->new(
'use_cache' => 1,
'debug' => $opt->{'debug'}
'use_cache' => ($opt->{'disable-cache'} ? undef : 1),
'debug' => $opt->{'debug'}
);
$rdap->ua->proxy([qw(http https)], $opt->{'proxy'}) if ($opt->{'proxy'});
......@@ -231,6 +232,8 @@ sub check_gtld_conformance {
# Implementation Guide - RDAP Protocol - 1.9.1: The resource records for the RDAP service MUST be signed with DNSSEC, and the DNSSEC chain of trust from the root trust anchor to the name of the RDAP server MUST be valid.
# Use dnsviz to test dnssec?
my $rrsig_answer = $resolver->query($host, 'RRSIG');
my @sigs = scalar(grep { 'RRSIG' eq $_->type } $rrsig_answer->answer);
if (scalar(@sigs) > 0) {
......@@ -521,6 +524,9 @@ installed you can use a SOCKS proxy by givin the URL the C<socks://> scheme.
=item * C<--debug> - enable debug mode (i.e. print HTTP and DNS requests and
responsees).
=item * C<--disable-cache> - bypass L<Net::RDAP>'s built-in cache and always
query the server directly.
=item * C<--help> - show this help.
=back
......
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