From 4044cff0cafe6091d106cbc3fcc09a1c161c1a7c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Apr 2020 08:13:23 +0200 Subject: lib/mk-ca-bundle: skip empty certs Reported-by: Ashwin Metpalli Fixes #5278 Closes # --- lib/mk-ca-bundle.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 09e8e5b9b..5cc458885 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -531,6 +531,11 @@ while () { } else { my $data = $cka_value; $cka_value = ""; + + if(!length($data)) { + # if empty, skip + next; + } my $encoded = MIME::Base64::encode_base64($data, ''); $encoded =~ s/(.{1,${opt_w}})/$1\n/g; my $pem = "-----BEGIN CERTIFICATE-----\n" -- cgit v1.2.1