Skip to content

Conversation

GregDomzalski
Copy link
Contributor

Description

Reverts the change in behavior to open smart card handles exclusively. Instead now defaults back to shared like it was before, but allows for applications to toggle between the new and old behavior through the use of AppContext.SetSwitch.

Fixes #72 and probably #81 as well.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Wrote some test code using the TestApp and verified:

  • No compat flag present = SHARED
  • Flag present & false = SHARED
  • Flag present & true = EXCLUSIVE

Test configuration:

  • Firmware version: 5.4.3
  • Yubikey model: ANFC

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have run dotnet format to format my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@GregDomzalski GregDomzalski requested a review from DennisDyallo May 7, 2024 21:26
Copy link

github-actions bot commented May 7, 2024

Test Results: Windows

    2 files      2 suites   2s ⏱️
3 615 tests 3 615 ✅ 0 💤 0 ❌
3 617 runs  3 617 ✅ 0 💤 0 ❌

Results for commit 9ceeb6a.

Copy link

github-actions bot commented May 7, 2024

Test Results: Ubuntu

    2 files      2 suites   5s ⏱️
3 607 tests 3 607 ✅ 0 💤 0 ❌
3 609 runs  3 609 ✅ 0 💤 0 ❌

Results for commit 9ceeb6a.

Copy link

github-actions bot commented May 7, 2024

Code Coverage

Package Line Rate Branch Rate Complexity Health
Yubico.Core 42% 32% 4245
Yubico.YubiKey 51% 47% 18417
Summary 49% (31675 / 64299) 45% (8017 / 17967) 22662

Minimum allowed line rate is 40%

Copy link

github-actions bot commented May 7, 2024

Test Results: MacOS

    2 files      2 suites   1s ⏱️
3 607 tests 3 607 ✅ 0 💤 0 ❌
3 609 runs  3 609 ✅ 0 💤 0 ❌

Results for commit 9ceeb6a.

@DennisDyallo DennisDyallo added the enhancement New feature or request label May 8, 2024
@DennisDyallo
Copy link
Collaborator

LGTM

Copy link
Collaborator

@DennisDyallo DennisDyallo left a comment

Choose a reason for hiding this comment

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

Although I would've preferred dependency injection I agree this is the least intrusive change 👍

@GregDomzalski GregDomzalski merged commit 9ceeb6a into develop May 8, 2024
@GregDomzalski GregDomzalski deleted the bugfix/add-compat-flag-for-exclusivity branch May 8, 2024 16:43
@DennisDyallo DennisDyallo mentioned this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

8010000B SCARD_E_SHARING_VIOLATION
2 participants