diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-22 08:13:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-22 10:49:00 +0200 |
commit | 4044cff0cafe6091d106cbc3fcc09a1c161c1a7c (patch) | |
tree | 42aa56aef9df736257498f55cdce2ac599bde5ad | |
parent | ae15bfc9cecbb71fe60a30934d1f1ffc3520720b (diff) | |
download | curl-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-x | lib/mk-ca-bundle.pl | 5 |
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" |