Use BE/LE functions for packing uint16.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-12-23 21:01:12 +01:00
parent 2a3ac550ec
commit 6d516b1b78
5 changed files with 16 additions and 17 deletions

View File

@@ -119,8 +119,8 @@ int cmd_select() {
res_APDU[res_APDU_size++] = 0x85;
res_APDU[res_APDU_size++] = 5;
uint16_t opts = get_device_options();
res_APDU[res_APDU_size++] = opts >> 8;
res_APDU[res_APDU_size++] = opts & 0xff;
put_uint16_t_be(opts, res_APDU + res_APDU_size);
res_APDU_size += 2;
res_APDU[res_APDU_size++] = 0xFF;
res_APDU[res_APDU_size++] = HSM_VERSION_MAJOR;
res_APDU[res_APDU_size++] = HSM_VERSION_MINOR;