mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Fixed lost OpenSSL output with "-t".
The OpenSSL pipe wrote to the final CA bundle file, but the encoded PEM output wrote to a temporary file. Consequently, the OpenSSL output was lost when the temp file was renamed to the final file at script finish (overwriting the final file written earlier by openssl). Patch posted to the list by Richard Michael (rmichael edgeofthenet org).
This commit is contained in:
parent
11dee0bfae
commit
88535d593e
@ -203,9 +203,9 @@ while (<TXT>) {
|
||||
print CRT $pem;
|
||||
}
|
||||
if ($opt_t) {
|
||||
open(TMP, "|$openssl x509 -md5 -fingerprint -text -inform PEM >> $crt") or die "Couldn't open openssl pipe: $!\n";
|
||||
print TMP $pem;
|
||||
close(TMP) or die "Couldn't close openssl pipe: $!\n";
|
||||
my $openssl_output = `echo '$pem' | $openssl x509 -md5 -fingerprint -text -inform PEM` or
|
||||
die "Couldn't run openssl : $?\n";
|
||||
print CRT $openssl_output;
|
||||
}
|
||||
print STDERR "Parsing: $caname\n" if ($opt_v);
|
||||
$certnum ++;
|
||||
|
Loading…
Reference in New Issue
Block a user