Openssl on mac -In is not working
I don't get any errors when I make a temporary file:

openssl version &gt; /$TMPDIR/foo
openssl dgst -sha256 /$TMPDIR/foo


My version is OpenSSL 0.9.8zg 14 July 2015 and the sha256 of the resulting foo file is 

SHA256(/tmp/foo)= 34ff579703733495dc5b883f288b71653653c8b449da860a1b6fb382fde1a5f1


Maybe you just need to remove the -in to calculate your digest?