Skip to content

Fix DecodeSubjInfoAcc rejecting certs without id-ad-caRepository#9917

Open
jayharper wants to merge 1 commit intowolfSSL:masterfrom
jayharper:fix/sia-missing-ca-repo-non-fatal
Open

Fix DecodeSubjInfoAcc rejecting certs without id-ad-caRepository#9917
jayharper wants to merge 1 commit intowolfSSL:masterfrom
jayharper:fix/sia-missing-ca-repo-non-fatal

Conversation

@jayharper
Copy link

Summary

DecodeSubjInfoAcc() currently returns ASN_PARSE_E when the Subject Information Access (SIA) extension does not contain an id-ad-caRepository (OID 1.3.6.1.5.5.7.48.5) access description. This is overly strict.

RFC 5280 section 4.2.2.2 defines SIA as a SEQUENCE OF AccessDescription where each entry may use any access method OID — id-ad-caRepository is only one possibility. The existing code references the Federal PKI fpki-x509-cert-profile-common profile (section 5.3) which does require caRepository, but this is a profile-specific constraint, not an RFC 5280 requirement.

Real-world impact

ISO 15118-20 (Electric Vehicle charging) PKI certificates include SIA extensions with custom access-method OIDs defined under arc 2.40.246.14.20.0 (ISO/IEC 15118-20 Plug & Charge). These certificates are structurally valid per RFC 5280 but are rejected by wolfSSL with ASN_PARSE_E, preventing interoperability with ISO 15118-20 charging infrastructure.

This was discovered and validated on production EV charging equipment (SECC) parsing contract certificate chains from Keysight EV simulators.

Change

When no caRepository URI is found in the SIA extension, log a debug message via WOLFSSL_MSG() but do not set ret = ASN_PARSE_E. The extension is still fully parsed and any caRepository entries that are present are still extracted — only the hard failure for missing entries is removed.

Test plan

  • Existing wolfSSL test suite should continue to pass (no test asserts ASN_PARSE_E for missing caRepository)
  • Certificates with id-ad-caRepository in SIA continue to work identically
  • Certificates with non-standard SIA access methods (e.g., ISO 15118-20) now parse successfully

DecodeSubjInfoAcc() returns ASN_PARSE_E when the Subject Information
Access extension does not contain an id-ad-caRepository access
description.  This is overly strict: RFC 5280 section 4.2.2.2 defines
SIA as a SEQUENCE OF AccessDescription where each entry may use any
access method OID — id-ad-caRepository is only one possibility.

Real-world impact: ISO 15118-20 (Electric Vehicle charging) PKI
certificates include SIA extensions with custom access-method OIDs
(e.g. under arc 2.40.246.14.20.0).  wolfSSL rejects these otherwise
valid certificates with ASN_PARSE_E, preventing interoperability with
ISO 15118-20 Plug & Charge infrastructure.

Change: when no caRepository URI is found in the SIA extension, log a
debug message but do not set ret = ASN_PARSE_E.  The extension is
still fully parsed; only the hard failure is removed.

Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>
@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

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