I am using below test keypair and commands to sign and verify testfile.
openssl dgst -sha256 -sign privkey -out sig.sha256 testfile
openssl dgst -sha256 -verify pubkey.pem -signature sig.sha256 testfile
All working, until I copied over the testfile, sig.sha256 and pubkey.pem to another machine and ran verification, and it failed. This is consistent behaviour and fails everytime on that machine (Linux/Yocto).
Openssl version on the machine (x86-Ubuntu) where verification works -
OpenSSL 1.1.1b 26 Feb 2019
OpenSSL 1.0.2o 27 Mar 2018 (compiled and installed on seperate path to try it out)
Openssl version on the machine (ARM-Linux/Yocto) where verification fails -
OpenSSL 1.0.2o 27 Mar 2018
Any pointer to debug this?