Skip to content

Report the failure reason from the certification path builder - #217

Merged
Xor-el merged 1 commit into
masterfrom
pkix-builder-reason
Oct 29, 2026
Merged

Xor-el merged 1 commit into
masterfrom
pkix-builder-reason

Conversation

@Xor-el

@Xor-el Xor-el commented Oct 29, 2026

Copy link
Copy Markdown
Owner

TPkixCertPathBuilder used to keep only the text of the last failing candidate path, so callers could not tell why a build failed. EPkixCertPathBuilderCryptoLibException now carries a Reason, and the builder reports the most specific one among the candidates (expired, signature, critical extension and so on).

A certificate that names a trust anchor as its issuer but fails the signature check used to end as no issuer found. That failure is now kept, so the reason is an invalid signature. Related PKIX suites pass on FPC and the Delphi Win32 suite passes.

The builder now raises with the most specific reason among the candidate paths instead of only the last failure's text, and no longer drops an invalid signature from a certificate that names a trust anchor.
@Xor-el
Xor-el merged commit 143c2ae into master Oct 29, 2026
15 checks passed
@Xor-el
Xor-el deleted the pkix-builder-reason branch October 29, 2026 03:35
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.

1 participant