Nothing like replying to your own post, but I am looking at the description of the process in the Dutch manual. It looks like you need a copy of their test "cert.pem" and test "test.sig" files to get the exact results they show. the openssl command allows you to specify -in for input file and -out for output file. Much better than the example below. I think they have the message in a file (./test), and should be cating the file for input to openssl. I think -in and -out would be easier to manage ( but that's your call! )
echo "test" | openssl dgst -sha1 -verify cert.pem -signature test.sig
The process (from the Dutch manual) seems to be:
- Generate message ( your $string )
- get SHA1 of message
- encrypt SHA1 160 bit (20 karakters) with your private DES 1024 bit key (cert.pem) and sign with signature (test.sig).
Nice that they show you the result, but without the exact files "cert.pem" and "test.sig", you will not get their result.
You may be working but can't prove it with-out the above files. Also they will need your public key in order to verify the signature and decrypt the message. Looks to me, you will need help from their IT dept to verify that it works.
Sorry about the "byte" comment, I assume you were just translating "karakters" to "chars".
"Well done is better than well said." - Benjamin Franklin
|