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

tests: Initial connect test and docs #19

Merged
merged 1 commit into from
Nov 25, 2019
Merged

tests: Initial connect test and docs #19

merged 1 commit into from
Nov 25, 2019

Conversation

tarcieri
Copy link
Collaborator

Adds an extremely basic initial test to ensure that we are able to connect to a YubiKey.

The test is marked #[ignore] in the hope that we can eventually start adding tests which run in CI, e.g. against a mock card.

This also includes a fix for calculating the APDU size, since the ones we were sending originally were overly long.

@tarcieri
Copy link
Collaborator Author

Note that this nukes all of the original C source code tests, but these are present both in the source history and in the original project, so I think we'll be OK.

@@ -376,7 +388,7 @@ impl YubiKey {
/// Change the Personal Identification Number (PIN).
///
/// The default PIN code is 123456
pub unsafe fn change_pin(&mut self, current_pin: &[u8], new_pin: &[u8]) -> Result<(), Error> {
pub fn change_pin(&mut self, current_pin: &[u8], new_pin: &[u8]) -> Result<(), Error> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, this is an extraneous change I wanted to do separately, but if nobody cares I think I'll just leave it in here.

Adds an extremely basic initial test to ensure that we are able to
connect to a YubiKey.

The test is marked `#[ignore]` in the hope that we can eventually start
adding tests which run in CI, e.g. against a mock card.

This also includes a fix for calculating the APDU size, since the ones
we were sending originally were overly long.
@tarcieri tarcieri merged commit eb399cb into develop Nov 25, 2019
@tarcieri tarcieri deleted the tests branch November 25, 2019 18:32
@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.

1 participant