Conversation
Jira Pull Request LinkThis Pull Request refers to Jira issues: |
mastro993
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
Chain verification was broken and inconsistent across platforms. A chain whose leaf publishes no CRL Distribution Point — the case in the current IT-Wallet PKI — failed on Android in every configuration, and passed on iOS only because iOS never checked revocation.
Both platforms now apply the same per-certificate policy: a certificate is checked against its CRL only when it publishes a CDP. No CDP means not checkable, not a failure. A revoked certificate always fails, including with
requireCrl: false. An undetermined status fails only withrequireCrl: true.Root causes:
UNDETERMINED_REVOCATION_STATUS.requireCrl: falsedid not opt out.VALID.This does not remove the need for the PKI to publish a CDP on the leaf plus the matching CRL signed by the sub-CA. Leaf revocation is unverifiable by any conforming client today (
openssl verify -crl_check→unable to get certificate CRLat depth 0). Once published, the new policy picks them up with no code change.List of changes proposed in this pull request
isRevocationEnabled = false); the policy lives incheckRevocationPerCertificate/checkCertificateAgainstCrls. Path validation runs before any CRL fetch. RemovedfetchCrlsForChain,findIssuerCertificate,CrlFetchException,hasCrlDistributionPoint.requireCrlis set — this closes the revoked-sub-CA hole. All CDP URIs are extracted (not just the first), filtered to HTTP/HTTPS, tried in order.fetchCRLchecks the HTTP status, so a 404 body no longer reaches the DER parser.-2now maps toCRL_PARSE_FAILED(previously unreachable),-6toCRL_FETCH_FAILED. Removed inference of revocation from genericSecTrustfailures, which produced falseCERTIFICATE_REVOKEDresults.certChainBase64reached afirst!force-unwrap and trapped. Now returnsINVALID_CHAIN_PATH, with the module rejecting the promise as Android does.VALIDATION_ERROR; it now truncates like Android, comparing the anchor by DER instead of object identity. The "trust anchor alone" special case was dropped, as the general path covers it identically.How to test
[leaf, sub],requireCrl=falseVALID(unchecked)VALIDVALID[leaf, sub],requireCrl=trueCRL_REQUIRED_BUT_MISSING_CDPVALIDVALID[leaf, sub, root]VALIDATION_ERRORVALIDVALID[root]aloneVALIDVALIDVALID[leaf](no connection)INVALID_TRUST_ANCHORINVALID_TRUST_ANCHORINVALID_TRUST_ANCHORINVALID_CHAIN_PATHINVALID_CHAIN_PATH