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

Create typed structs for PIN-protected and admin metadata #223

Merged
merged 2 commits into from
Jan 31, 2021

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Jan 31, 2021

MgmKey::set_protected and YubiKey::set_pin_last_changed both contained bugs resulting from the conversion of C pointer logic (incorrect buffer management). The new Metadata struct holds its own buffer, avoiding the problem.

Part of #27.

str4d added 2 commits January 31, 2021 17:36
MgmKey::set_protected and YubiKey::set_pin_last_changed both contained
bugs resulting from the conversion of C pointer logic (incorrect buffer
management). The new Metadata struct holds its own buffer, avoiding the
problem.
assert!(yubikey.authenticate(protected.clone()).is_ok());

// Set back to the default management key.
// TODO: This does not clear the previous key from the protected metadata.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Figured I'd leave this test and functionality behind the untested feature flag until we'd decided how to address this. See also #27 (comment).

@tony-iqlusion tony-iqlusion merged commit 9d1da84 into iqlusioninc:main Jan 31, 2021
@str4d str4d deleted the metadata branch January 31, 2021 19:34
@tony-iqlusion tony-iqlusion mentioned this pull request Mar 22, 2021
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.

2 participants