I'm trying to verify a file that was signed by hashing with SHA-1 and encrypting the hash with an RSA private key.
Obviously I'm using the RSA public key to verify. The key is in DER format.
The signature verification works correctly using Java's Signature class.
The openssl command I'm trying (and the result) is:
~/Downloads/openssl-1.0.0-beta3/apps/openssl pkeyutl -in encryptedZip.bin
-keyform DER -verify -sigfile savedDigitalSignature.txt -pubin -inkey public.der
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Signature Verification Failure
I don't see anything in the openssl configuration file that would apply, so I don't think that warning is significant.
The savedDigitalSignature.txt file contains the signature bytes.
My theory is that openssl is looking for the digital signature to be in some specific file format, but I haven't found anything in the documentation indicating what that should be.
Thoughts?