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

Clean up APDU construction with builder API #15

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

tarcieri
Copy link
Collaborator

Changes the APDU struct into a builder for serialized APDU messages.

This makes APDU construction safer and more idiomatic, and also caught a few bugs in the process (missing templ from the C translation).

Changes the `APDU` struct into a builder for serialized APDU messages.

This makes APDU construction safer and more idiomatic, and also caught a
few bugs in the process (missing templ from the C translation).
@tarcieri tarcieri merged commit 96cd5d0 into develop Nov 21, 2019
@tarcieri tarcieri deleted the apdu-cleanups branch November 21, 2019 17:18
}
}

apdu.zeroize();
let _ = self._ykpiv_end_transaction();
Copy link
Contributor

Choose a reason for hiding this comment

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

Now missing the transaction end for the paths that lead here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@str4d wouldn't worry too much about these. in my PC/SC PR I'm deleting them all and replacing them with the safe RAII pcsc::Transaction type.

@tarcieri tarcieri mentioned this pull request Nov 25, 2019
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