]> git.proxmox.com Git - pve-common.git/commitdiff
cert: avoid module-wide variable used only once
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 17:31:58 +0000 (18:31 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 17:36:46 +0000 (18:36 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Certificate.pm

index 7fabc3ad7438a7b329f60ed65b7063d2cc272fe5..13ecb575d45db1bf68d80486d85800daee422e64 100644 (file)
@@ -91,8 +91,6 @@ PVE::JSONSchema::register_standard_option('pve-certificate-info', {
     },
 });
 
-# see RFC 7468
-my $b64_char_re = qr![0-9A-Za-z\+/]!;
 my $header_re = sub {
     my ($label) = @_;
     return qr!-----BEGIN\ $label-----(?:\s|\n)*!;
@@ -104,6 +102,7 @@ my $footer_re = sub {
 my $pem_re = sub {
     my ($label) = @_;
 
+    my $b64_char_re = qr![0-9A-Za-z\+/]!; # see RFC 7468
     my $header = $header_re->($label);
     my $footer = $footer_re->($label);