Skip to content

Conversation

@sosthene-nitrokey
Copy link
Contributor

@sosthene-nitrokey sosthene-nitrokey commented Jan 15, 2026

The approach taken is to instead of re-opening the connection for every command, we hold an exclusive CCID connection for the entire application, and never re-open it.

We can't use the same strategy as CTAHID because

  • When using an exclusive connection, re-opening one fails.
  • Closing and re-opening exclusive connections is not an option without major refactor to avoid having multiple connections opened at the same time.
  • When using a non-exclusive connection, security status changes such as pin validation will fail because operations over a key will not be using the same transaction.

The approach taken is to instead of re-opening
the connection for every command, we hold an exclusive
CCID connection for the entire application, and never re-open it.

We can't use the same strategy as CTAHID because:

When using an exclusive connection, re-opening one fails.
When using a non-exclusive connection, security status changes such
as pin validation will fail because operations over a key will not
be using the same transaction.
@sosthene-nitrokey sosthene-nitrokey force-pushed the ccid branch 3 times, most recently from d03f6e2 to 6172942 Compare January 15, 2026 16:35
@sosthene-nitrokey sosthene-nitrokey marked this pull request as ready for review January 15, 2026 16:41
@sosthene-nitrokey sosthene-nitrokey requested review from daringer, mmerklinger and robin-nitrokey and removed request for daringer January 15, 2026 16:41
self.inner = inner

def __getattribute__(self, name: str) -> Any:
getattr(self.inner, name)
Copy link
Member

Choose a reason for hiding this comment

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

missing return?

@robin-nitrokey
Copy link
Member

Note that this conflicts with #387 though it should not be too hard to resolve the conflicts.

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