Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
perl-Net-DNS
fix_incorrectly_generated_algbyval_table.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_incorrectly_generated_algbyval_table.patch of Package perl-Net-DNS
diff --git a/lib/Net/DNS/RR/TSIG.pm b/lib/Net/DNS/RR/TSIG.pm index 97ddc79..7731057 100644 --- a/lib/Net/DNS/RR/TSIG.pm +++ b/lib/Net/DNS/RR/TSIG.pm @@ -48,16 +48,16 @@ use constant TSIG => typebyname qw(TSIG); 'HMAC-SHA' => 161, ); - my %algbyname = map { s /[^A-Za-z0-9]//g; $_ } @algbyalias, @algbyname; my %algbyval = reverse @algbyname; + my @algbynum = map { ( $_, 0 + $_ ) } keys %algbyval; # accept algorithm number + + my %algbyname = map { s /[^A-Za-z0-9]//g; $_ } @algbyalias, @algbyname, @algbynum; sub algbyname { - my $name = shift; - my $key = $name; # synthetic key - $key =~ s /[^A-Za-z0-9]//g; # strip non-alphanumerics - return 0 + $name unless $key =~ /\D/; # accept algorithm number - return $algbyname{uc $key}; + my $key = uc shift; # synthetic key + $key =~ s /[^A-Z0-9]//g; # strip non-alphanumerics + return $algbyname{$key}; } sub algbyval {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor