Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nfc: Enable MFUL sync poller to be provided with passwords #4050

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

GMMan
Copy link
Contributor

@GMMan GMMan commented Dec 30, 2024

What's new

  • Consumers of the MIFARE Ultralight card read sync poller can specify a password to authenticate with

Verification

  • When reading a MFUL card with the sync poller, pass in a MfUltralightPollerAuthContext with skip_auth set to false and the required password/3DES key. The card should automatically be unlocked during reading.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Sidenote: why not make a separate struct just for passing passwords? Because for some reason the same struct is being used to supply passwords for MFUL elsewhere, even when most of its members aren't used. It's kind of weird.

@@ -23,6 +23,7 @@ typedef struct {
FuriThreadId thread_id;
MfUltralightError error;
MfUltralightPollerContextData data;
const MfUltralightPollerAuthContext* auth_context;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mf_ultralight_poller_sync_read_card is used in unit_tests only and why to add new parameter here, if this function is then called with NULL populated in this parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although there are no system usages of mf_ultralight_poller_sync_read_card currently, it is exposed as an API available for user apps and NFC plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants