diff options
author | Ian Moffett <ian@osmora.org> | 2024-09-26 00:31:15 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-09-26 00:31:15 -0400 |
commit | b132db61e45603878944e2cd11ea9334838d274d (patch) | |
tree | 5f05adf47dda300bd08dc6eb3796e24011214b2b | |
parent | 1c630b1722da9a6c15e206f0405e36468f1a48f1 (diff) |
project: Use unsigned byte for data
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | client/main.c | 2 | ||||
-rw-r--r-- | lib/include/net/stpsession.h | 6 | ||||
-rw-r--r-- | ostp.d/net/otd_auth.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/client/main.c b/client/main.c index 1551065..e6fcb7a 100644 --- a/client/main.c +++ b/client/main.c @@ -39,7 +39,7 @@ #define OSTP_PORT 5352 static void -log_pubkey(unsigned char *pubkey) +log_pubkey(uint8_t pubkey[]) { for (size_t i = 0; i < 32; ++i) { printf("%02X ", pubkey[i] & 0xFF); diff --git a/lib/include/net/stpsession.h b/lib/include/net/stpsession.h index 6564cc4..1b22e1b 100644 --- a/lib/include/net/stpsession.h +++ b/lib/include/net/stpsession.h @@ -66,10 +66,10 @@ * R: Reserved, keep zero. */ struct session_request { - char hash[64]; + uint8_t hash[64]; uint8_t options; - char pubkey[32]; - char pad[8]; + uint8_t pubkey[32]; + uint8_t pad[8]; } PACKED; #endif /* STP_SESSION_H_ */ diff --git a/ostp.d/net/otd_auth.c b/ostp.d/net/otd_auth.c index 9784356..e16d7b2 100644 --- a/ostp.d/net/otd_auth.c +++ b/ostp.d/net/otd_auth.c @@ -35,7 +35,7 @@ #define KEY_BYTE_WIDTH 32 static void -log_pubkey(char pubkey[KEY_BYTE_WIDTH]) +log_pubkey(uint8_t pubkey[KEY_BYTE_WIDTH]) { for (size_t i = 0; i < KEY_BYTE_WIDTH; ++i) { printf("%02X ", pubkey[i] & 0xFF); |