<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This is my first post.  OpenSSL is not my forte.<div class=""><br class=""></div><div class="">The code below returns an unexpected checksum value for openssl-1.1.1i..  Strangely, when the same code is run for a previous version, the correct checksum value is returned.   Here is what I’ve tried:</div><div class=""><div class=""><br class=""><div class="">1.  Downloaded the current SHA256 value for openssl-1.1.1i.tar.gz from <a href="https://www.openssl.org/source/" class="">https://www.openssl.org/source/</a></div><div class="">2.  Included that checksum value in the code below</div><div class="">3.  Run the code in macOS Version10.15.7’s Terminal app (using bash)</div><div class="">4.  Observed that the checksum value does not match the downloaded value in Step 1 above</div></div><div class=""><br class=""></div><div class="">Here is the part of the script associated with the problem.  Notice an incorrect checksum of <span style="font-family: Menlo; font-size: 11px;" class="">c413e17d876098e89478c85e1d2b96db79bcdc943ad54550f0351da4f141ec5e is returned at the end.  What am I doing wrong? </span></div><div class=""><br class=""></div><div class=""><div class="">#!/bin/zsh</div><div class=""># This script builds OpenSSL libssl and libcrypto for 64-bit devices.</div><div class=""># Binary distribution for ios64-cross-arm64 and ios64-cross-arm64e</div><div class=""><br class=""></div><div class="">VERSION=“1.1.1i”</div><div class="">VERSION_SHA256_CHECKSUM="e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242"</div><div class=""><br class=""></div><div class="">##############################################################</div><div class="">curl -Ov <a href="https://www.openssl.org/source/openssl-$VERSION.tar.gz" class="">https://www.openssl.org/source/openssl-$VERSION.tar.gz</a></div><div class=""><br class=""></div><div class=""># Checksum to verify OpenSSL files are not corrupted.</div><div class="">FILE_CHECKSUM=$(shasum -a 256 openssl-$VERSION.tar.gz | awk '{print $1; exit}')</div><div class="">if [ "$FILE_CHECKSUM" != "$VERSION_SHA256_CHECKSUM" ]; then</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>echo "OpenSSL version $VERSION failed checksum."</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>echo "Checksum should be:" $VERSION_SHA256_CHECKSUM</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>echo "Actual downloaded file checksum:" $FILE_CHECKSUM</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>exit 1</div><div class="">fi</div></div><div class=""><br class=""></div><div class="">Here is the verbose listing returned by the script:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">chrisoutwin@Chriss-iMac OpenSSL % bash build.sh</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">                                 Dload  Upload   Total   Spent    Left  Speed</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 23.2.168.18...</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TCP_NODELAY set</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* Connected to <a href="http://www.openssl.org" class="">www.openssl.org</a> (23.2.168.18) port 443 (#0)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* ALPN, offering h2</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* ALPN, offering http/1.1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* successfully set certificate verify locations:</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*   CAfile: /etc/ssl/cert.pem</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  CApath: none</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (OUT), TLS handshake, Client hello (1):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">} [229 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS handshake, Server hello (2):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [108 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS handshake, Certificate (11):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [2556 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS handshake, Server key exchange (12):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [333 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS handshake, Server finished (14):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [4 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">} [70 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">} [1 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (OUT), TLS handshake, Finished (20):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">} [16 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [1 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* TLSv1.2 (IN), TLS handshake, Finished (20):</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [16 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* ALPN, server accepted to use http/1.1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* Server certificate:</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  subject: CN=<a href="http://www.openssl.org" class="">www.openssl.org</a></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  start date: Oct 30 19:31:03 2020 GMT</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  expire date: Jan 28 19:31:03 2021 GMT</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  subjectAltName: host "<a href="http://www.openssl.org" class="">www.openssl.org</a>" matched cert's "<a href="http://www.openssl.org" class="">www.openssl.org</a>"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">*  SSL certificate verify ok.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">> GET /source/openssl-“1.1.1i”.tar.gz HTTP/1.1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">> Host: <a href="http://www.openssl.org" class="">www.openssl.org</a></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">> User-Agent: curl/7.64.1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">> Accept: */*</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">> </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0< HTTP/1.1 404 Not Found</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Server: Apache/2.4.29 (Ubuntu)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Accept-Ranges: bytes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Content-Type: text/html; charset=UTF-8</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Content-Length: 4182</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Cache-Control: max-age=172800</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Expires: Wed, 30 Dec 2020 15:20:43 GMT</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Date: Mon, 28 Dec 2020 15:20:43 GMT</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< Connection: keep-alive</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">< </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">{ [1536 bytes data]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">100  4182  100  4182    0     0   5873      0 --:--:-- --:--:-- --:--:--  5873</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* Connection #0 to host <a href="http://www.openssl.org" class="">www.openssl.org</a> left intact</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* Closing connection 0</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">OpenSSL version “1.1.1i” failed checksum.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Checksum should be: e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Actual downloaded file checksum: c413e17d876098e89478c85e1d2b96db79bcdc943ad54550f0351da4f141ec5e</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div></div></body></html>