@@ -171,6 +171,7 @@ func (k *Key) PrintBPMPubKey(bpmAlg Algorithm) error {
171
171
if _ , err := hash .Write (buf .Bytes ()); err != nil {
172
172
return fmt .Errorf ("unable to hash: %w" , err )
173
173
}
174
+ fmt .Printf (" Boot Policy Manifest Pubkey: 0x%x\n " , buf )
174
175
fmt .Printf (" Boot Policy Manifest Pubkey Hash: 0x%x\n " , hash .Sum (nil ))
175
176
} else if k .KeyAlg == AlgSM2 || k .KeyAlg == AlgECC {
176
177
if err := binary .Write (buf , binary .LittleEndian , k .Data ); err != nil {
@@ -179,6 +180,7 @@ func (k *Key) PrintBPMPubKey(bpmAlg Algorithm) error {
179
180
if _ , err := hash .Write (buf .Bytes ()); err != nil {
180
181
return fmt .Errorf ("unable to hash: %w" , err )
181
182
}
183
+ fmt .Printf (" Boot Policy Manifest Pubkey: 0x%x\n " , buf )
182
184
fmt .Printf (" Boot Policy Manifest Pubkey Hash: 0x%x\n " , hash .Sum (nil ))
183
185
} else {
184
186
fmt .Printf (" Boot Policy Manifest Pubkey Hash: Unknown Algorithm\n " )
@@ -211,6 +213,7 @@ func (k *Key) PrintKMPubKey(kmAlg Algorithm) error {
211
213
if _ , err := hash .Write (buf .Bytes ()); err != nil {
212
214
return fmt .Errorf ("unable to hash: %w" , err )
213
215
}
216
+ fmt .Printf (" Key Manifest Pubkey: 0x%x\n " , buf )
214
217
fmt .Printf (" Key Manifest Pubkey Hash: 0x%x\n " , hash .Sum (nil ))
215
218
// On SKL and KBL the exponent is not included in the KM hash
216
219
buf .Truncate (len (k .Data [4 :]))
0 commit comments