Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tpmutil/mssim/mssim.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,15 @@ func (c *Conn) Write(b []byte) (int, error) {
buff.WriteByte(0)
// size of the command
binary.Write(buff, binary.BigEndian, uint32(len(b)))
// raw command
buff.Write(b)

if _, err := buff.WriteTo(c.conn); err != nil {
return 0, fmt.Errorf("write MS simulator command: %v", err)
}
// The raw command is transmitted separately. Easy to analyze in wireshark.
// https://github.com/google/go-tpm/pull/339
if _, err := c.conn.Write(b); err != nil {
return 0, fmt.Errorf("write MS simulator command: %v", err)
}
return len(b), nil
}

Expand Down