Skip to content

Clarify Secure Channel authenticate precondition: SD must be selected by caller - #5

Merged
yuki-js merged 2 commits into
mainfrom
copilot/fix-secure-channel-auth-javadoc
Sep 2, 2026
Merged

yuki-js merged 2 commits into
mainfrom
copilot/fix-secure-channel-auth-javadoc

Conversation

Copilot AI commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

SecureChannelSession.authenticate() and SCP protocol docs described an internal SELECT step that no longer exists in protocol implementations. This mismatch obscured a real call-site precondition and contributed to cold-session failures when authentication starts before ISD selection.

  • What changed

    • Updated SecureChannelSession.authenticate() javadoc to remove the SELECT step from the documented flow.
    • Added explicit precondition text: the Security Domain must already be selected; caller must issue plain SELECT.
    • Applied the same precondition/documentation alignment to:
      • Scp03Protocol.authenticate() (removed stale SELECT step from flow docs)
      • Scp02Protocol.authenticate() (added method-level javadoc with the same precondition)
  • Scope

    • Documentation-only change; no runtime logic or protocol behavior changed.
    • Keeps current responsibility split (selection at call sites such as install flow), while making the contract explicit for non-install call paths.
/**
 * <p><strong>Precondition:</strong> the card's Security Domain identified by
 * {@link SecureChannelProfile#securityDomainAid()} must already be selected before calling
 * this method. Callers are responsible for issuing the plain SELECT command.
 */

Co-authored-by: yuki-js <20838151+yuki-js@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix javadoc for SecureChannelSession.authenticate() to reflect removed SELECT Clarify Secure Channel authenticate precondition: SD must be selected by caller Sep 2, 2026
Copilot AI requested a review from yuki-js September 2, 2026 13:09
@yuki-js
yuki-js marked this pull request as ready for review September 2, 2026 13:17
@yuki-js
yuki-js merged commit 6316595 into main Sep 2, 2026
4 checks passed
@yuki-js
yuki-js deleted the copilot/fix-secure-channel-auth-javadoc branch September 2, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants