mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
lib/mk-ca-bundle: skip empty certs
Reviewed-by: Emil Engler Reported-by: Ashwin Metpalli Fixes #5278 Closes #5280
This commit is contained in:
parent
3fdc4bdb5b
commit
bffa116535
@ -63,7 +63,7 @@ $opt_d = 'release';
|
|||||||
# If the OpenSSL commandline is not in search path you can configure it here!
|
# If the OpenSSL commandline is not in search path you can configure it here!
|
||||||
my $openssl = 'openssl';
|
my $openssl = 'openssl';
|
||||||
|
|
||||||
my $version = '1.27';
|
my $version = '1.28';
|
||||||
|
|
||||||
$opt_w = 76; # default base64 encoded lines length
|
$opt_w = 76; # default base64 encoded lines length
|
||||||
|
|
||||||
@ -531,6 +531,11 @@ while (<TXT>) {
|
|||||||
} else {
|
} else {
|
||||||
my $data = $cka_value;
|
my $data = $cka_value;
|
||||||
$cka_value = "";
|
$cka_value = "";
|
||||||
|
|
||||||
|
if(!length($data)) {
|
||||||
|
# if empty, skip
|
||||||
|
next;
|
||||||
|
}
|
||||||
my $encoded = MIME::Base64::encode_base64($data, '');
|
my $encoded = MIME::Base64::encode_base64($data, '');
|
||||||
$encoded =~ s/(.{1,${opt_w}})/$1\n/g;
|
$encoded =~ s/(.{1,${opt_w}})/$1\n/g;
|
||||||
my $pem = "-----BEGIN CERTIFICATE-----\n"
|
my $pem = "-----BEGIN CERTIFICATE-----\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user