add support for complete response

This commit is contained in:
Rohan Meringenti 2022-07-12 11:49:49 -04:00
parent 3f0395de8f
commit 7ed80af9d6
No known key found for this signature in database
GPG Key ID: 403927C99FC911A4
2 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,7 @@ messages is depleted.
Currently the following commands are implemented:
* DeviceInfo
* Reset
* GenerateAsymmetricKey
* SignDataEddsa

View File

@ -16,10 +16,13 @@ type (
}
DeviceInfoResponse struct {
MajorVersion uint8
MinorVersion uint8
BuildVersion uint8
SerialNumber uint32
MajorVersion uint8
MinorVersion uint8
BuildVersion uint8
SerialNumber uint32
LogTotal uint8
LogUsed uint8
SupportedAlgorithms []Algorithm
}
CreateSessionResponse struct {
@ -235,6 +238,8 @@ func parseDeviceInfoResponse(payload []byte) (Response, error) {
MinorVersion: payload[1],
BuildVersion: payload[2],
SerialNumber: serialNumber,
LogTotal: payload[8],
LogUsed: payload[9],
}, nil
}
func parseCreateSessionResponse(payload []byte) (Response, error) {