Skip to content

Fix keygen passphrase changes - #148

Merged
Foxboron merged 1 commit into
Foxboron:masterfrom
elohmeier:fix/keygen-passphrase-order
Nov 11, 2026
Merged

Foxboron merged 1 commit into
Foxboron:masterfrom
elohmeier:fix/keygen-passphrase-order

Conversation

@elohmeier

Copy link
Copy Markdown
Contributor

Fix the old/new passphrase order in ChangeAuth and strengthen the CLI regression test.

Red/green verified; full tests, vet, and Staticcheck pass.

Pass the old passphrase before the new passphrase to ChangeAuth, matching the oldpin, newpin argument order in go-tpm-keyfiles.

The existing CLI test supplied -P and -N in reverse and masked the bug. Correct the flags and check that the old passphrase is rejected without modifying the key file, while the saved key accepts the new passphrase for a second change.

The corrected regression fails before the fix with TPM_RC_AUTH_FAIL and passes after it. Full go test ./... -count=1, go vet ./..., and Staticcheck v0.8.2 also pass.
@Foxboron
Foxboron merged commit a9d3ab3 into Foxboron:master Nov 11, 2026
@Foxboron

Copy link
Copy Markdown
Owner

Thanks!

@elohmeier
elohmeier deleted the fix/keygen-passphrase-order branch November 12, 2026 05:42
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