All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ima-evm-utils: Fix ima_verify for v1 signatures
@ 2019-07-26 22:23 Vitaly Chikunov
  2019-07-30 11:31 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Chikunov @ 2019-07-26 22:23 UTC (permalink / raw)
  To: Mimi Zohar, Dmitry Kasatkin, linux-integrity

Use user supplied key in verify_hash for DIGSIG_VERSION_1.
Otherwise v1 signatures don't pass verification.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
 src/libimaevm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libimaevm.c b/src/libimaevm.c
index a582872..97f193e 100644
--- a/src/libimaevm.c
+++ b/src/libimaevm.c
@@ -612,6 +612,8 @@ int verify_hash(const char *file, const unsigned char *hash, int size, unsigned
 		/* Read pubkey from RSA key */
 		if (!imaevm_params.keyfile)
 			key = "/etc/keys/pubkey_evm.pem";
+		else
+			key = imaevm_params.keyfile;
 		return verify_hash_v1(file, hash, size, sig, siglen, key);
 	} else if (sig[0] == DIGSIG_VERSION_2) {
 		return verify_hash_v2(file, hash, size, sig, siglen);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ima-evm-utils: Fix ima_verify for v1 signatures
  2019-07-26 22:23 [PATCH] ima-evm-utils: Fix ima_verify for v1 signatures Vitaly Chikunov
@ 2019-07-30 11:31 ` Mimi Zohar
  0 siblings, 0 replies; 2+ messages in thread
From: Mimi Zohar @ 2019-07-30 11:31 UTC (permalink / raw)
  To: Vitaly Chikunov, Dmitry Kasatkin, linux-integrity

On Sat, 2019-07-27 at 01:23 +0300, Vitaly Chikunov wrote:
> Use user supplied key in verify_hash for DIGSIG_VERSION_1.
> Otherwise v1 signatures don't pass verification.
> 
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>

Thanks!

Mimi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-30 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 22:23 [PATCH] ima-evm-utils: Fix ima_verify for v1 signatures Vitaly Chikunov
2019-07-30 11:31 ` Mimi Zohar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.