Get hash algorithm info from the signature
authorVivek Goyal <vgoyal@redhat.com>
Fri, 12 Jul 2013 18:52:08 +0000 (14:52 -0400)
committerDmitry Kasatkin <d.kasatkin@samsung.com>
Mon, 15 Jul 2013 15:02:02 +0000 (18:02 +0300)
commitfa3c365cce3bbe8d2f6fa80019677ed20b9b2f67
tree82346442fc38d673c060f21c2c40c3241b204d88
parent00caa1d5ba376cc5d756cc0bf721ace36204d70a
Get hash algorithm info from the signature

If one signs a file using hash algo -sha256 then one needs to specify
signature during verification also. Otherwise evmctl using default sha1
for calculating hash and signature verification fails. One needs to
specify -a sha256 on command line even during signature verification
phase to make sure file is signed right.

I think that's completely unnecessary. A user is not always supposed
to know what algorithm was used to generate signature. User is only
concered with whether this signature is valid or not.

So retrieve hash algorithm info from signature and use that.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
src/evmctl.c