diff -Nru libauth-yubikey-webclient-perl-4.01/debian/changelog libauth-yubikey-webclient-perl-4.02/debian/changelog --- libauth-yubikey-webclient-perl-4.01/debian/changelog 2016-10-18 20:04:18.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/changelog 2019-07-21 19:00:45.000000000 +0000 @@ -1,3 +1,20 @@ +libauth-yubikey-webclient-perl (4.02-1) unstable; urgency=medium + + * Team upload. + + [ Salvatore Bonaccorso ] + * Update Vcs-* headers for switch to salsa.debian.org + + [ Joenio Costa ] + * Import upstream version 4.02 + * debhelper-compat = 12 + * declare compliance with Debian Policy 4.4.0 + * update upstream copyright years + * use uscan version 4 + * add upstream metadata + + -- Joenio Costa Sun, 21 Jul 2019 16:00:45 -0300 + libauth-yubikey-webclient-perl (4.01-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libauth-yubikey-webclient-perl-4.01/debian/compat libauth-yubikey-webclient-perl-4.02/debian/compat --- libauth-yubikey-webclient-perl-4.01/debian/compat 2016-10-18 20:03:02.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -9 diff -Nru libauth-yubikey-webclient-perl-4.01/debian/control libauth-yubikey-webclient-perl-4.02/debian/control --- libauth-yubikey-webclient-perl-4.01/debian/control 2016-10-18 20:04:18.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/control 2019-07-21 19:00:45.000000000 +0000 @@ -4,16 +4,16 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper-compat (= 12) Build-Depends-Indep: perl, libdigest-hmac-perl, libtest-pod-coverage-perl, libtest-pod-perl, liburi-perl, libwww-perl -Standards-Version: 3.9.8 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libauth-yubikey-webclient-perl.git -Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libauth-yubikey-webclient-perl.git +Standards-Version: 4.4.0 +Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libauth-yubikey-webclient-perl +Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libauth-yubikey-webclient-perl.git Homepage: https://metacpan.org/release/Auth-Yubikey_WebClient Package: libauth-yubikey-webclient-perl diff -Nru libauth-yubikey-webclient-perl-4.01/debian/copyright libauth-yubikey-webclient-perl-4.02/debian/copyright --- libauth-yubikey-webclient-perl-4.01/debian/copyright 2016-10-18 20:04:18.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/copyright 2019-07-21 19:00:45.000000000 +0000 @@ -4,7 +4,7 @@ Source: https://metacpan.org/release/Auth-Yubikey_WebClient Files: * -Copyright: 2016, Phil Massyn +Copyright: 2016-2019, Phil Massyn License: Artistic or GPL-1+ Files: debian/* diff -Nru libauth-yubikey-webclient-perl-4.01/debian/upstream/metadata libauth-yubikey-webclient-perl-4.02/debian/upstream/metadata --- libauth-yubikey-webclient-perl-4.01/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/upstream/metadata 2019-07-21 19:00:45.000000000 +0000 @@ -0,0 +1,7 @@ +--- +Archive: CPAN +Bug-Database: https://github.com/massyn/Auth-Yubikey_WebClient/issues +Contact: Phil Massyn +Name: Auth-Yubikey_WebClient +Repository: https://github.com/massyn/Auth-Yubikey_WebClient.git +Repository-Browse: https://github.com/massyn/Auth-Yubikey_WebClient diff -Nru libauth-yubikey-webclient-perl-4.01/debian/watch libauth-yubikey-webclient-perl-4.02/debian/watch --- libauth-yubikey-webclient-perl-4.01/debian/watch 2014-03-04 10:29:39.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/debian/watch 2019-07-21 19:00:45.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -https://metacpan.org/release/Auth-Yubikey_WebClient .*/Auth-Yubikey_WebClient-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ +version=4 +https://metacpan.org/release/Auth-Yubikey_WebClient .*/Auth-Yubikey_WebClient-v?@ANY_VERSION@@ARCHIVE_EXT@$ diff -Nru libauth-yubikey-webclient-perl-4.01/lib/Auth/Yubikey_WebClient.pm libauth-yubikey-webclient-perl-4.02/lib/Auth/Yubikey_WebClient.pm --- libauth-yubikey-webclient-perl-4.01/lib/Auth/Yubikey_WebClient.pm 2016-10-13 09:31:45.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/lib/Auth/Yubikey_WebClient.pm 2019-04-04 23:45:35.000000000 +0000 @@ -13,11 +13,11 @@ =head1 VERSION -Version 4.01 +Version 4.02 =cut -our $VERSION = '4.01'; +our $VERSION = '4.02'; =head1 SYNOPSIS @@ -88,36 +88,28 @@ my $self = {}; bless $self, ref $class || $class; - - if(! defined $options_ref) - { + + if(! defined $options_ref) { die "You did not pass any parameters to the Yubikey Web Client initialization"; - } + } my %options = %{$options_ref}; # grab the variables from the initialization - if(defined $options{id}) - { + if(defined $options{id}) { $self->{id} = $options{id}; - } - else - { + } else { die "Can not start without a Yubikey ID"; } - if(defined $options{api}) - { - $self->{api} = $options{api}; + if(defined $options{api}) { + $self->{api} = $options{api}; - if(length($self->{api}) % 4 != 0) - { + if(length($self->{api}) % 4 != 0) { die "Your API key must be in 4 byte lengths"; } - } - else - { - die "Can not start without a Yubikey API key"; - } + } else { + die "Can not start without a Yubikey API key"; + } $self->{nonce} = defined $options{nonce} ? $options{nonce} : ''; @@ -154,10 +146,10 @@ print "sl = $self->{sl}\n"; print "timestamp = $self->{timestamp}\n"; print "sessioncounter = $self->{sessioncounter}\n"; - print "sessionuse = $self->{sessionuse}\n"; + print "sessionuse = $self->{sessionuse}\n"; # print "response = $self->{response}\n"; - + } =head2 yubikey_webclient @@ -193,13 +185,12 @@ $self->{otp} = $otp; # lets do a basic sanity check on the otp, before we blast it off to yubico... - if($self->{otp} !~ /[cbdefghijklnrtuv]/i || length($self->{otp}) < 32) - { + if($self->{otp} !~ /[cbdefghijklnrtuv]/i || length($self->{otp}) < 32) { $self->{status} = "ERR_BAD_OTP"; - return $self->{status}; + return $self->{status}; } - # Generate nonce unless passed + # Generate nonce unless passed $self->{nonce} = hmac_sha1_hex(time, rand()) unless $self->{nonce}; # Start generating the parameters @@ -208,20 +199,17 @@ # pass the request to yubico my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => $self->{verify_hostname} }); + $ua->env_proxy(); # 4.02 my $req = HTTP::Request->new(GET => $self->{url} . "?$self->{params}"); my $res = $ua->request($req); - if($res->is_success) - { + if($res->is_success) { $self->{response} = $res->content; - } - else - { + } else { print $res->status_line . "\n"; } chomp($self->{response}); - if($self->{response} !~ /status=ok/i) - { + if($self->{response} !~ /status=ok/i) { # If the status is not ok, let's not even go through the rest... $self->{response} =~ m/status=(.+)/; $self->{status} = "ERR_$1"; @@ -231,9 +219,8 @@ #extract each of the lines, and store in a hash... - my %result; - foreach (split(/\n/,$self->{response})) - { + my %result; + foreach (split(/\n/,$self->{response})) { chomp; if($_ =~ /=/) { @@ -251,8 +238,7 @@ my $datastring=''; my $key; - foreach $key (sort keys %result) - { + foreach $key (sort keys %result) { $result{$key} =~ s/\s//g; $datastring .= "$key=$result{$key}&"; } @@ -263,21 +249,16 @@ return "ERR_MSG_AUTH" unless ($self->{nonce} eq $result{nonce} and $self->{otp} eq $result{otp}); - my $hmac = encode_base64(hmac_sha1($datastring,decode_base64($self->{api}))); - - chomp($hmac); - - if($hmac eq $signatur) - { + my $hmac = encode_base64(hmac_sha1($datastring,decode_base64($self->{api}))); + chomp($hmac); + if($hmac eq $signatur) { $self->{publicid} = substr(lc($self->{otp}),0,12); $self->{status} = "OK"; return "OK"; - } - else - { + } else { $self->{status} = "ERR_HMAC"; - return "ERR_HMAC"; - } + return "ERR_HMAC"; + } } =head1 USAGE @@ -334,6 +315,7 @@ 2.01 - Response turning into an array due to \r bug (Thanks to Peter Norin) 3.00 - Major update 4.01 - 13.10.2016 - Requested by Peter Norin - update to use LWP::UserAgent, and the option to overwrite a valid SSL certificate (verify_hostname). The API default server is changed to ssl. +4.02 - 2019.04.04 - Request by Alexandre Linte - Support for proxy servers =head1 ACKNOWLEDGEMENTS diff -Nru libauth-yubikey-webclient-perl-4.01/README libauth-yubikey-webclient-perl-4.02/README --- libauth-yubikey-webclient-perl-4.01/README 2010-12-08 13:07:27.000000000 +0000 +++ libauth-yubikey-webclient-perl-4.02/README 2019-04-04 23:45:35.000000000 +0000 @@ -30,8 +30,8 @@ You can also look for information at: - RT, CPAN's request tracker - http://rt.cpan.org/NoAuth/Bugs.html?Dist=Auth-Yubikey_WebClient + Issues + https://github.com/massyn/Auth-Yubikey_WebClient/issues AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/Auth-Yubikey_WebClient @@ -45,7 +45,7 @@ COPYRIGHT AND LICENCE -Copyright (C) 2009 Phil Massyn +Copyright (C) 2019 Phil Massyn This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.