From: Jay Satiro Date: Tue, 25 Oct 2016 07:17:26 +0000 (-0400) Subject: mk-ca-bundle: Update the vbscript version X-Git-Tag: curl-7_51_0~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2c6d15;p=thirdparty%2Fcurl.git mk-ca-bundle: Update the vbscript version Bring the VBScript version more in line with the perl version: - Change timestamp to UTC. - Change URL retrieval to HTTPS-only by default. - Comment out the options that disabled SSL cert checking by default. - Assume OpenSSL is present, get SHA256. And add a flag to toggle it. - Fix cert issuer name output. The cert issuer output is now ansi, converted from UTF-8. Prior to this it was corrupt UTF-8. It turns out though we can work with UTF-8 the FSO object that writes ca-bundle can't write UTF-8, so there will have to be some alternative if UTF-8 is needed (like an ADODB.Stream). - Disable the certificate text info feature. The certificate text info doesn't work properly with any recent OpenSSL. --- diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 38e7ff73c8..75278f168a 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -244,7 +244,8 @@ sub sha256 { close(FILE); } else { # Use OpenSSL command if Perl Digest::SHA modules not available - $result = (split(/ |\r|\n/,`$openssl dgst -sha256 $_[0]`))[1]; + $result = `"$openssl" dgst -r -sha256 "$_[0]"`; + $result =~ s/^([0-9a-f]{64}) .+/$1/is; } return $result; } @@ -392,7 +393,7 @@ print CRT <