support different algos
This commit is contained in:
parent
f8327c312f
commit
62bd7cb7a1
@ -32,6 +32,7 @@ use constant END_FOUND =>3;
|
||||
my $port = 53;
|
||||
my $ttl = 3600;
|
||||
my $help = 0;
|
||||
my $tsigalgo = 'hmac-md5';
|
||||
my ($oldcert, $cert, $tsigname, $tsigkey, $server, $verbose, $tsig);
|
||||
my ($old_rr, $new_rr, $update, $resolver, $reply);
|
||||
|
||||
@ -43,7 +44,8 @@ GetOptions("help|?" => \$help,
|
||||
"cert=s" => \$cert,
|
||||
"ttl=i" => \$ttl,
|
||||
"tsigname=s" => \$tsigname,
|
||||
"tsigkey=s" => \$tsigkey)
|
||||
"tsigkey=s" => \$tsigkey,
|
||||
"tsigalgo=s" => \$tsigalgo)
|
||||
or die("Error in command line arguments\n");
|
||||
|
||||
pod2usage(1) if ($help or scalar(@ARGV) != 2);
|
||||
@ -94,6 +96,7 @@ if (defined $old_rr && defined $new_rr) {
|
||||
|
||||
if (defined $tsigname && defined $tsigkey) {
|
||||
$tsig = Net::DNS::RR::TSIG->create($tsigname, $tsigkey);
|
||||
$tsig->algorithm($tsigalgo);
|
||||
say $tsig->string if ($verbose);
|
||||
$update->push( additional => $tsig);
|
||||
}
|
||||
@ -166,6 +169,7 @@ dnsupdate_tlsa [options] zone dnsname
|
||||
-port DNS port
|
||||
-tsigname Name of tsig key
|
||||
-tsigkey tsig key
|
||||
-tsigalgo tsig algorithm
|
||||
-oldcert old certificate, to remote TLSA record
|
||||
-cert current certificate, to add TLSA record
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user