$ openssl versionOpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023)$ openssl base64 -d -in OPNsense-24.1-checksums-amd64.sha256.sig -out /tmp/image.sig$ openssl dgst -sha256 -verify OPNsense-24.1.pub -signature /tmp/image.sig OPNsense-24.1-checksums-amd64.sha256Verified OK$ sha256sum -c OPNsense-24.1-checksums-amd64.sha256sha256sum: OPNsense-24.1-dvd-amd64.iso.bz2: No such file or directoryOPNsense-24.1-dvd-amd64.iso.bz2: FAILED open or readsha256sum: OPNsense-24.1-nano-amd64.img.bz2: No such file or directoryOPNsense-24.1-nano-amd64.img.bz2: FAILED open or readOPNsense-24.1-serial-amd64.img.bz2: OKsha256sum: OPNsense-24.1-vga-amd64.img.bz2: No such file or directoryOPNsense-24.1-vga-amd64.img.bz2: FAILED open or readsha256sum: WARNING: 3 listed files could not be read$ openssl base64 -d -in OPNsense-24.1-serial-amd64.img.sig -out /tmp/image.sig$ openssl dgst -sha256 -verify OPNsense-24.1.pub -signature /tmp/image.sig OPNsense-24.1-serial-amd64.img.bz2 Verification failure40B71F91A37F0000:error:02000068:rsa routines:ossl_rsa_verify:bad signature:../openssl-3.0.12/crypto/rsa/rsa_sign.c:430:40B71F91A37F0000:error:1C880004:Provider routines:rsa_verify:RSA lib:../openssl-3.0.12/providers/implementations/signature/rsa_sig.c:774:
$ openssl dgst -sha256 -verify OPNsense-24.1.pub -signature /tmp/image.sig OPNsense-24.1-serial-amd64.imgVerified OK
Thanks, the decompressed image verifies OK. Code: [Select]$ openssl dgst -sha256 -verify OPNsense-24.1.pub -signature /tmp/image.sig OPNsense-24.1-serial-amd64.imgVerified OKHowever the manual still mentions the .bz2 image.
$ openssl base64 -d -in ${sig} -out - | \ openssl dgst -sha256 -verify $pub -signature /dev/stdin <(bzip2 -cdv ${sig::-4}.bz2)
#!/bin/bashsha256sum -c ./OPNsense*.sha256for pub in ./*.pubdo for sig in ${pub::-4}*.sig do echo "Verifying signature: $sig" if [ -f ${sig::-4} ] then openssl base64 -d -in ${sig} -out - | \ openssl dgst -sha256 -verify $pub -signature /dev/stdin ${sig::-4} elif [ -f ${sig::-4}.bz2 ] then echo "File is compressed with bzip, will decompress in pipe..." openssl base64 -d -in ${sig} -out - | \ openssl dgst -sha256 -verify $pub -signature /dev/stdin <(bzip2 -cdv ${sig::-4}.bz2) else echo "Error: Could not find source file to compare..." fi donedone