]> git.proxmox.com Git - pve-access-control.git/commitdiff
drop libdigest-hmac-perl dependency
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 1 Jul 2016 08:15:27 +0000 (10:15 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 1 Jul 2016 08:21:53 +0000 (10:21 +0200)
Its functionality is provided by perl core's Digest::SHA
module now.

PVE/AccessControl.pm
control.in

index 60232851915b88058a3443e99b43da81648981d1..de2908e68b9c37783165a7580d078056deb48f61 100644 (file)
@@ -9,7 +9,6 @@ use Net::SSLeay;
 use Net::IP;
 use MIME::Base64;
 use Digest::SHA;
 use Net::IP;
 use MIME::Base64;
 use Digest::SHA;
-use Digest::HMAC_SHA1;
 use URI::Escape;
 use LWP::UserAgent;
 use PVE::Tools qw(run_command lock_file file_get_contents split_list safe_print);
 use URI::Escape;
 use LWP::UserAgent;
 use PVE::Tools qw(run_command lock_file file_get_contents split_list safe_print);
@@ -1184,7 +1183,8 @@ sub yubico_compute_param_sig {
        $paramstr .= "$key=$param->{$key}";
     }
 
        $paramstr .= "$key=$param->{$key}";
     }
 
-    my $sig = uri_escape(encode_base64(Digest::HMAC_SHA1::hmac_sha1($paramstr, decode_base64($api_key || '')), ''));
+    # hmac_sha1_base64 does not add '=' padding characters, so we use encode_base64
+    my $sig = uri_escape(encode_base64(Digest::SHA::hmac_sha1($paramstr, decode_base64($api_key || '')), ''));
 
     return ($paramstr, $sig);
 }
 
     return ($paramstr, $sig);
 }
@@ -1202,7 +1202,7 @@ sub yubico_verify_otp {
     $url = 'http://api2.yubico.com/wsapi/2.0/verify' if !defined($url);
 
     my $params = {
     $url = 'http://api2.yubico.com/wsapi/2.0/verify' if !defined($url);
 
     my $params = {
-       nonce =>  Digest::HMAC_SHA1::hmac_sha1_hex(time(), rand()),
+       nonce =>  Digest::SHA::hmac_sha1_hex(time(), rand()),
        id => $api_id,
        otp => uri_escape($otp),
        timestamp => 1,
        id => $api_id,
        otp => uri_escape($otp),
        timestamp => 1,
index 876d3ddc0226fe242d440f7f66734178ebd144c0..b74aaf1f4419d080fce2da0d2e8c90d9e98e1987 100644 (file)
@@ -3,7 +3,7 @@ Version: @@VERSION@@-@@PKGRELEASE@@
 Section: perl
 Priority: optional
 Architecture: @@ARCH@@
 Section: perl
 Priority: optional
 Architecture: @@ARCH@@
-Depends: libc6 (>= 2.3), perl (>= 5.6.0-16), libcrypt-openssl-rsa-perl, libcrypt-openssl-random-perl, libjson-xs-perl, libjson-perl, libterm-readline-gnu-perl,libnet-ldap-perl, libpve-common-perl, pve-cluster, libauthen-pam-perl, libnet-ssleay-perl, libdigest-hmac-perl, liburi-perl, libwww-perl, oathtool, libmime-base32-perl
+Depends: libc6 (>= 2.3), perl (>= 5.6.0-16), libcrypt-openssl-rsa-perl, libcrypt-openssl-random-perl, libjson-xs-perl, libjson-perl, libterm-readline-gnu-perl,libnet-ldap-perl, libpve-common-perl, pve-cluster, libauthen-pam-perl, libnet-ssleay-perl, liburi-perl, libwww-perl, oathtool, libmime-base32-perl
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Description: Proxmox VE access control library
  This package contains the role based user management and access
 Maintainer: Proxmox Support Team <support@proxmox.com>
 Description: Proxmox VE access control library
  This package contains the role based user management and access