Skip to content

Commit

Permalink
Merge remote-tracking branch 'OFW/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Jan 10, 2025
2 parents f2c84e0 + 35c1bfc commit 535dd83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions applications/main/u2f/u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ static uint16_t u2f_register(U2fData* U2F, uint8_t* buf) {
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, private, sizeof(private)));
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, req->app_id, sizeof(req->app_id)));
MCHECK(mbedtls_md_hmac_finish(&hmac_ctx, handle.hash));

mbedtls_md_free(&hmac_ctx);
}

// Generate public key
Expand Down Expand Up @@ -387,6 +389,8 @@ static uint16_t u2f_authenticate(U2fData* U2F, uint8_t* buf) {
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, priv_key, sizeof(priv_key)));
MCHECK(mbedtls_md_hmac_update(&hmac_ctx, req->app_id, sizeof(req->app_id)));
MCHECK(mbedtls_md_hmac_finish(&hmac_ctx, mac_control));

mbedtls_md_free(&hmac_ctx);
}

if(memcmp(req->key_handle.hash, mac_control, sizeof(mac_control)) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/nfc/protocols/mf_ultralight/mf_ultralight_poller_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MfUltralightError mf_ultralight_poller_auth_pwd(
furi_check(data);

uint8_t auth_cmd[5] = {MF_ULTRALIGHT_CMD_PWD_AUTH}; //-V1009
memccpy(&auth_cmd[1], data->password.data, 0, MF_ULTRALIGHT_AUTH_PASSWORD_SIZE);
memcpy(&auth_cmd[1], data->password.data, MF_ULTRALIGHT_AUTH_PASSWORD_SIZE);
bit_buffer_copy_bytes(instance->tx_buffer, auth_cmd, sizeof(auth_cmd));

MfUltralightError ret = MfUltralightErrorNone;
Expand Down

0 comments on commit 535dd83

Please sign in to comment.