Merge pull request #248 from 9elements/skl_kbl_km
manifest/key.go: Also print the correct KM hash for SKL/KBL
This commit is contained in:
commit
69a9c4b528
|
@ -202,6 +202,11 @@ func (k *Key) PrintKMPubKey(kmAlg Algorithm) error {
|
|||
}
|
||||
hash.Write(buf.Bytes())
|
||||
fmt.Printf(" Key Manifest Pubkey Hash: 0x%x\n", hash.Sum(nil))
|
||||
// On SKL and KBL the exponent is not included in the KM hash
|
||||
buf.Truncate(len(k.Data[4:]))
|
||||
hash.Reset()
|
||||
hash.Write(buf.Bytes())
|
||||
fmt.Printf(" Key Manifest Pubkey Hash (Skylake and Kabylake only): 0x%x\n", hash.Sum(nil))
|
||||
} else {
|
||||
fmt.Printf(" Key Manifest Pubkey Hash: Unsupported Algorithm\n")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue