Skip to content

Fix Issue #135#143

Merged
cedelavergne-ledger merged 1 commit intodevelopfrom
cev/fix_template
Jan 21, 2026
Merged

Fix Issue #135#143
cedelavergne-ledger merged 1 commit intodevelopfrom
cev/fix_template

Conversation

@cedelavergne-ledger
Copy link
Contributor

@cedelavergne-ledger cedelavergne-ledger commented Jan 16, 2026

Description

Issue: The application freezes during GPG initialization (command GET_DATA 0x6E) when using a hybrid ECC key configuration.

Root Cause: The response payload size (246 bytes) triggers a transport layer freeze
on the physical device (T=0 protocol).
While technically within the Short APDU limit (256 bytes), sending a payload this close to the maximum size causes the Host/Driver to fail capturing the Status Word correctly, resulting in a timeout.

Fix: Reduced the 0x6E response size to ~224 bytes by omitting the optional Historical Bytes (Tag 5F 52). This "safe" size avoids the T=0 transport edge-case.

This PR fixes #135

Issue: The application freezes during GPG initialization (command `GET_DATA` `0x6E`)
when using a hybrid ECC key configuration.

Root Cause: The response payload size (246 bytes) triggers a transport layer freeze
 on the physical device (T=0 protocol).
While technically within the Short APDU limit (256 bytes),
sending a payload this close to the maximum size causes the Host/Driver to fail
capturing the Status Word correctly, resulting in a timeout.

Fix: Reduced the 0x6E response size to ~224 bytes by omitting the optional Historical Bytes (Tag `5F 52`).
This "safe" size avoids the T=0 transport edge-case.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.13%. Comparing base (1cb14b1) to head (d2b27fd).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #143   +/-   ##
========================================
  Coverage    36.13%   36.13%           
========================================
  Files            4        4           
  Lines          238      238           
  Branches        35       35           
========================================
  Hits            86       86           
  Misses         152      152           
Flag Coverage Δ
unittests 36.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cedelavergne-ledger cedelavergne-ledger merged commit 01e1206 into develop Jan 21, 2026
65 of 68 checks passed
@cedelavergne-ledger cedelavergne-ledger deleted the cev/fix_template branch January 21, 2026 10:54
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.

Device (Stax) not recognized depending on Key Template

2 participants