X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FCertificate.pm;fp=src%2FPVE%2FCertificate.pm;h=31a77223f83c556e393be3a3165ea168eda5ae1d;hp=5bc9848f15bbe7cf13eb05b16272358267bfba49;hb=eb6262a6b746141bc67a6a8a90bfc728065db385;hpb=dc00c0529d809a5813096d63a9511658041cdbbf diff --git a/src/PVE/Certificate.pm b/src/PVE/Certificate.pm index 5bc9848..31a7722 100644 --- a/src/PVE/Certificate.pm +++ b/src/PVE/Certificate.pm @@ -199,10 +199,8 @@ my $read_certificate = sub { or $ssl_die->("unable to read '$cert_path' - $!\n"); my $cert = Net::SSLeay::PEM_read_bio_X509($bio); - if (!$cert) { - Net::SSLeay::BIO_free($bio); - die "unable to read certificate from '$cert_path'\n"; - } + Net::SSLeay::BIO_free($bio); + die "unable to read certificate from '$cert_path'\n" if !$cert; return $cert; };