From 3d398e8e0f88cf45fb7cdfb0778db9774b1af346 Mon Sep 17 00:00:00 2001 From: Daniel Maslowski Date: Sun, 22 Sep 2024 18:26:43 +0200 Subject: [PATCH] intelmeta fixup Signed-off-by: Daniel Maslowski --- cmds/intelmeta/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmds/intelmeta/main.go b/cmds/intelmeta/main.go index a505571c..1644f2fc 100644 --- a/cmds/intelmeta/main.go +++ b/cmds/intelmeta/main.go @@ -223,7 +223,7 @@ func main() { if meta.Polm != nil { // https://go.dev/tour/methods/15 _, ok := meta.Polm.(cbntbootpolicy.Manifest) - if ok == true { + if ok { pol := meta.Polm.(cbntbootpolicy.Manifest) key := pol.PMSE.Key alg := pol.PMSE.Signature.HashAlg @@ -237,10 +237,9 @@ func main() { meta.LeakedKey = hex.EncodeToString(lk[:8]) } } - } - if ok == false { + } else { p, ok := meta.Polm.(bgbootpolicy.Manifest) - if ok == true { + if ok { // the first 4 bytes are some sort of flags key := p.PMSE.Key k := key.Data[4:]