]> git.proxmox.com Git - pve-common.git/commitdiff
cert: drop single-use warn helper
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 17:06:26 +0000 (18:06 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 17:36:42 +0000 (18:36 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Certificate.pm

index 10e73014b5ecfd9d9352afd99c45dae1d8662d67..6fecc350cf71d7c412becfd27dd1434b0961e97a 100644 (file)
@@ -184,12 +184,6 @@ my sub ssl_die {
     Net::SSLeay::die_now("$msg\n");
 };
 
-my $ssl_warn = sub {
-    my ($msg) = @_;
-    Net::SSLeay::print_errs();
-    warn $msg if $msg;
-};
-
 my $read_certificate = sub {
     my ($cert_path) = @_;
 
@@ -377,7 +371,7 @@ sub generate_csr {
 
     my $cleanup = sub {
        my ($warn, $die_msg) = @_;
-       $ssl_warn->() if $warn;
+       Net::SSLeay::print_errs() if $warn;
 
        Net::SSLeay::X509_REQ_free($req) if  $req;
        Net::SSLeay::EVP_PKEY_free($pk) if $pk;