diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-22 08:13:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-22 22:55:08 +0200 |
commit | bffa1165357a5964c44794c253019375c2a80250 (patch) | |
tree | 7cdfc4ed6ca734a6f40a20358d93bb8b0b0da4f5 /lib/mk-ca-bundle.pl | |
parent | 3fdc4bdb5b00835a1d04cf160cd61fe7f8feb477 (diff) | |
download | curl-bffa1165357a5964c44794c253019375c2a80250.tar.gz |
lib/mk-ca-bundle: skip empty certs
Reviewed-by: Emil Engler
Reported-by: Ashwin Metpalli
Fixes #5278
Closes #5280
Diffstat (limited to 'lib/mk-ca-bundle.pl')
-rwxr-xr-x | lib/mk-ca-bundle.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 09e8e5b9b..b9c7ed257 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -63,7 +63,7 @@ $opt_d = 'release'; # If the OpenSSL commandline is not in search path you can configure it here! my $openssl = 'openssl'; -my $version = '1.27'; +my $version = '1.28'; $opt_w = 76; # default base64 encoded lines length @@ -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" |