Skip to contentSkip to conversation

evmctl: support verification of portable EVM signatures

PATCH New [email protected] 1 participant 1 message Mar 26, 2020 Keys-trusted

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 evmctl: support verification of portable EVM signatures

From: Dmitry Baryshkov <[email protected]>

EVM signature code checked explicitly checked for signature type to be EVM_IMA_XATTR_DIGSIG (0x03). Allow it to be either EVM_IMA_XATTR_DIGSIG or EVM_XATTR_PORTABLE_DIGSIG.

---
 src/evmctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/evmctl.c +1 -1
index b02be8b1507a..b3f6f65523ef 100644
@@ -824,7 +824,7 @@ static int verify_evm(const char *file)
 		return len;
 	}
 
-	if (sig[0] != 0x03) {
+	if (sig[0] != EVM_IMA_XATTR_DIGSIG || sig[0] != EVM_XATTR_PORTABLE_DIGSIG) {
 		log_err("%s has no signature\n", xattr_evm);
 		return -1;
 	}
Signature · 1 line
2.25.1