Skip to content

Commit

Permalink
Do not init PHY on modifying a single value.
Browse files Browse the repository at this point in the history
Signed-off-by: Pol Henarejos <[email protected]>
  • Loading branch information
polhenarejos committed Jan 29, 2025
1 parent 584d2f3 commit e78ec82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pico-keys-sdk
Submodule pico-keys-sdk updated 1 files
+0 −1 src/fs/phy.c
9 changes: 8 additions & 1 deletion src/fido/cbor_make_credential.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,14 @@ int cbor_make_credential(const uint8_t *data, size_t len) {
if (memcmp(p, "CommissionProfile", 17) == 0) {
ret = phy_unserialize_data(user.id.data, user.id.len, &phy_data);
if (ret == PICOKEY_OK) {
file_put_data(ef_phy, user.id.data, user.id.len);
uint8_t tmp[PHY_MAX_SIZE];
uint16_t tmp_len = 0;
memset(tmp, 0, sizeof(tmp));
if (phy_serialize_data(&phy_data, tmp, &tmp_len) != PICOKEY_OK) {
CBOR_ERROR(CTAP2_ERR_PROCESSING);
}
DEBUG_DATA(tmp,tmp_len);
file_put_data(ef_phy, tmp, tmp_len);
}
}
#endif
Expand Down

0 comments on commit e78ec82

Please sign in to comment.