Skip to content

Allow SHA-384 and SHA-512 signature algorithms for issuer certs and trust anchors - #15783

Open
aniketatgithub wants to merge 1 commit into
linkerd:mainfrom
aniketatgithub:fix-15782-issuer-cert-sha384-512
Open

aniketatgithub wants to merge 1 commit into
linkerd:mainfrom
aniketatgithub:fix-15782-issuer-cert-sha384-512

Conversation

@aniketatgithub

Copy link
Copy Markdown

Problem

linkerd check fails "issuer cert is using supported crypto algorithm" when the issuer certificate is signed with SHA-384 or SHA-512, for example by a cert-manager RSA-4096 CA, which signs with SHA512WithRSA. checkECDSACertRequirements only accepted ECDSAWithSHA256 and SHA256WithRSA, and its error message claimed the certificate "must be signed by an ECDSA P-256 key", which is not what it checks. The proxy verifies RSA PKCS#1 and ECDSA signatures with SHA-256, SHA-384 or SHA-512, so identity and mTLS work with such an issuer and only the check stays red. checkRSACertRequirements had the same SHA-256-only rule for RSA trust anchors.

Solution

Accept ECDSAWithSHA384, ECDSAWithSHA512, SHA384WithRSA and SHA512WithRSA alongside the SHA-256 algorithms in both checks, through a shared isSupportedSignatureAlgorithm helper. The P-256 public key requirement for issuer certificates and the RSA 2048/4096 key-size requirement for trust anchors are unchanged. Error messages now list the accepted hashes, and the stale doc comment on CheckIssuerCertAlgoRequirements is corrected.

Validation

New table tests in pkg/issuercerts cover all six accepted algorithms for issuer certificates and RSA trust anchors, plus rejections (SHA-1 signatures, non-P-256 issuer keys, RSA issuer keys). The accept cases fail on unpatched code and pass with the fix. go test ./pkg/issuercerts/ passes; gofmt and go vet clean.

Fixes #15782

Signed-off-by: Aniket Kumar Tikariha aniketkomailkro@gmail.com

…rust anchors

Problem

`linkerd check` fails "issuer cert is using supported crypto algorithm" when the issuer certificate is signed with SHA-384 or SHA-512, for example by a cert-manager RSA-4096 CA, which signs with `SHA512WithRSA`. `checkECDSACertRequirements` only accepted `ECDSAWithSHA256` and `SHA256WithRSA`, and its error message claimed the certificate "must be signed by an ECDSA P-256 key", which is not what it checks. The proxy verifies RSA PKCS#1 and ECDSA signatures with SHA-256, SHA-384 or SHA-512, so identity and mTLS work with such an issuer and only the check stays red. `checkRSACertRequirements` had the same SHA-256-only rule for RSA trust anchors.

Solution

Accept `ECDSAWithSHA384`, `ECDSAWithSHA512`, `SHA384WithRSA` and `SHA512WithRSA` alongside the SHA-256 algorithms in both checks, through a shared `isSupportedSignatureAlgorithm` helper. The P-256 public key requirement for issuer certificates and the RSA 2048/4096 key-size requirement for trust anchors are unchanged. Error messages now list the accepted hashes, and the stale doc comment on `CheckIssuerCertAlgoRequirements` is corrected.

Validation

New table tests in `pkg/issuercerts` cover all six accepted algorithms for issuer certificates and RSA trust anchors, plus rejections (SHA-1 signatures, non-P-256 issuer keys, RSA issuer keys). The accept cases fail on unpatched code and pass with the fix. `go test ./pkg/issuercerts/` passes; `gofmt` and `go vet` clean.

Fixes linkerd#15782

Signed-off-by: Aniket Kumar Tikariha <aniketkomailkro@gmail.com>
@aniketatgithub
aniketatgithub requested a review from a team as a code owner November 13, 2026 06:38
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.

linkerd check rejects issuer certificates signed with SHA-384 or SHA-512

1 participant