summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-04-22 08:13:23 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-04-22 10:49:00 +0200
commit4044cff0cafe6091d106cbc3fcc09a1c161c1a7c (patch)
tree42aa56aef9df736257498f55cdce2ac599bde5ad
parentae15bfc9cecbb71fe60a30934d1f1ffc3520720b (diff)
downloadcurl-bagder/mk-ca-bundle.tar.gz
lib/mk-ca-bundle: skip empty certsbagder/mk-ca-bundle
Reported-by: Ashwin Metpalli Fixes #5278 Closes #
-rwxr-xr-xlib/mk-ca-bundle.pl5
1 files changed, 5 insertions, 0 deletions
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 (<TXT>) {
} 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"