Skip to content

Commit 82f5ee6

Browse files
authored
Append the 2-byte header to the data fields of HMACChallenge. (#264)
1 parent 8daa0fa commit 82f5ee6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/service/service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ func (s *Service) sendHMACChallenge(session *streamSession) error {
435435
Tpm20HmacChallenge: &bpb.BootstrapStreamResponse_Challenge_TPM20HMACChallenge{
436436
Key: session.chassis.ActivePublicKeyType,
437437
HmacChallenge: &epb.HMACChallenge{
438-
HmacPubKey: tpm2.Marshal(hmacPub),
439-
Duplicate: duplicate,
440-
InSymSeed: inSymSeed,
438+
HmacPubKey: tpm2.Marshal(tpm2.New2B(*hmacPub)),
439+
Duplicate: tpm2.Marshal(&tpm2.TPM2BPrivate{Buffer: duplicate}),
440+
InSymSeed: tpm2.Marshal(&tpm2.TPM2BEncryptedSecret{Buffer: inSymSeed}),
441441
},
442442
},
443443
},

0 commit comments

Comments
 (0)