diff --git a/dnsupdate_tlsa b/dnsupdate_tlsa index 4daffbb..a96cfb9 100755 --- a/dnsupdate_tlsa +++ b/dnsupdate_tlsa @@ -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