Skip to content

Fix RSA key size typo in trust anchor validation#15358

Open
immanuwell wants to merge 1 commit into
linkerd:mainfrom
immanuwell:fix/rsa-key-size-error-message
Open

Fix RSA key size typo in trust anchor validation#15358
immanuwell wants to merge 1 commit into
linkerd:mainfrom
immanuwell:fix/rsa-key-size-error-message

Conversation

@immanuwell

@immanuwell immanuwell commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Problem

checkRSACertRequirements rejects keys that aren't 2048 or 4096 bits, but the error message says "2084 bit" (typo for 2048) and "at least" which is misleading since 8192-bit keys are also rejected.

The typo has been there since #8868 introduced RSA trust anchor support.
Users hit this when running linkerd check with an RSA trust anchor that has an unsupported key size (e.g. 1024 or 3072 bits).

Solution

Fix the error string to say "2048 or 4096 bit", consistent with the adjacent line that already says "RSA 2048/4096 bit key".
Add unit tests for CheckTrustAnchorAlgoRequirements with RSA keys (the package had zero test coverage before).

Validation

go test ./pkg/issuercerts/...

Signed-off-by: immanuwell pchpr.00@list.ru

Problem

`checkRSACertRequirements` rejects keys that aren't 2048 or 4096 bits,
but the error message says "2084 bit" (typo for 2048) and "at least"
which is misleading since 8192-bit keys are also rejected.

Solution

Fix the error string to say "2048 or 4096 bit", matching both the
actual condition and the adjacent message on the next line.
Add unit tests for `CheckTrustAnchorAlgoRequirements` with RSA keys.

Validation

go test ./pkg/issuercerts/...

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell requested a review from a team as a code owner June 6, 2026 12:27
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