When we download a release from any project on GitHub we need to verify the integrity of the downloaded artifact. That is way most project come with their SHA256 checksums file, that we can download and compare with the calculated SHA256 checksum of the downloaded artifact.
For example, to download the latest version (3.1.1
) of openssl
for a Linux 64-bit system and verify its integrity with the SHA256 checksum:
$ curl -OL "https://github.com/openssl/openssl/releases/download/openssl-3.1.1/openssl-3.1.1.tar.gz"
$ curl -OL "https://github.com/openssl/openssl/releases/download/openssl-3.1.1/openssl-3.1.1.tar.gz.sha256"
$ echo "$(cat openssl-3.1.1.tar.gz.sha256)" "openssl-3.1.1.tar.gz" | sha256sum --check
curl
sha256sum