Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return the actual number of bytes written to through command buffer (#…
…287) The `Write` function returned the number of bytes written to the internal command response buffer in the simulator. Depending on the type of command executed against the TPM, this would usually result in a different number of bytes being written than the original input. The fix is useful if one wants to wrap the io.ReadWriterCloser functions with implementations that perform strict checks. An example is using an io.MultiWriter to capture the bytes sent to the TPM for debugging purposes, which will fail if the number of bytes written does not equal the original length of the input bytes.
- Loading branch information