aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan.zalega@gmail.com>2016-03-29 14:15:49 +0200
committerSzczepan Zalega <szczepan.zalega@gmail.com>2016-03-29 14:15:49 +0200
commitf19e5bdc349f0a98234745f66ef72324f47c656b (patch)
tree1b204ee33b9983da93751fd9d8ebf0b273321e30 /include/stick10_commands.h
parent955fb912ab9563a5246f9d3bfda9ccfab187949f (diff)
downloadlibnitrokey-f19e5bdc349f0a98234745f66ef72324f47c656b.tar.gz
libnitrokey-f19e5bdc349f0a98234745f66ef72324f47c656b.tar.bz2
working hotp tests on nitrokey pro (stick10)
Signed-off-by: Szczepan Zalega <szczepan.zalega@gmail.com>
Diffstat (limited to 'include/stick10_commands.h')
-rw-r--r--include/stick10_commands.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index 60c947f..f58ace4 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -136,12 +136,19 @@ class GetHOTP : Command<CommandID::GET_CODE> {
} __packed;
struct ResponsePayload {
- uint8_t code[18];
+ union {
+ uint8_t whole_response[18]; //TODO remove if not needed
+ struct {
+ uint32_t code;
+ uint8_t config;
+ } __packed;
+ } __packed;
bool isValid() const { return true; }
std::string dissect() const {
std::stringstream ss;
ss << "code:\t" << (code) << std::endl;
+ ss << "config:\t" << "TODO" /*(config) */<< std::endl; //TODO show byte field options
return ss.str();
}
} __packed;