Provides interfaces and data structures for representing, configuring, and validating X.509 certificates.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c166465f6ba8ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Provides interfaces and data structures for representing, configuring, and validating X.509 certificates.
The namespace ara::crypto::x509 provides interfaces and data types for managing, defining the usage of, and validating X.509 certificates as well as OCSP responses in AUTOSAR Adaptive. Certificate paths are checked via the validation context CertificateValidationCtx, parameterized using options such as CertificateValidationOptions[SWS_CRYPT_50107]. The result is reported back in a structured manner via status values like CertificateValidationStatus[SWS_CRYPT_40203], with online revocation checks being inactive by default and requiring explicit configuration.
Context
The namespace ara::crypto::x509 provides the central interfaces and data types for processing and validating X.509 certificate structures in the AUTOSAR Adaptive Platform. The interface model comprises the representation of digital certificates (Certificate), certificate signing requests (CertSignRequest), distinguished names (X509DN), and OCSP responses (OcspResponse). The instantiation and management of these cryptographic artifacts typically occurs via the provider interface X509Provider (Interpretation: The provider acts as a central factory instance for X.509 objects). Question Q-449a726a75b1e78d (open)
Context diagram: Interaction of the core interfaces for certificate management and path validation. Sources: [SWS_CRYPT_40101], [SWS_CRYPT_50097]
Usage Path
The primary operational workflow in the namespace consists of checking certificate paths via CertificateValidationCtx. The validation behavior is parameterized using bitmasks of type CertificateValidationOptions[SWS_CRYPT_50107]. By default, path validation is performed without involving online certificate status requests via the option kOcspOff[SWS_CRYPT_50114]. If validity is to be verified online, checking either the entire chain via kOcspResponseCompleteChain[SWS_CRYPT_50112] or exclusively the target certificate via kOcspResponseTargetOnly[SWS_CRYPT_50113] can be activated.
For specific validation scenarios, further validation options allow overriding default checks: Temporal validity limits can thus be ignored via kIgnoreNotBefore[SWS_CRYPT_50108] and kIgnoreNotAfter[SWS_CRYPT_50109]. Likewise, the evaluation of previously imported certificate revocation lists (CRLs) can be disabled with kIgnoreCrl[SWS_CRYPT_50111], or error signaling for unknown critical extensions can be suppressed via kIgnoreUnknownCriticalExtensions[SWS_CRYPT_50110]. After performing the validation, the context returns a result object CertificateValidationResult (Interpretation: The validation call incorporates the target certificate, check options, and optional OCSP responses and encapsulates the outcome in the result class). Question (open)
Sequence diagram: Procedure of a certificate validation using a verification context and evaluation of the result. Sources: [SWS_CRYPT_50107], [SWS_CRYPT_40203]
Error Scenarios
The result of a certificate path check is broken down in detail via the enumeration CertificateValidationStatus[SWS_CRYPT_40203]. A successful validation is signaled by kValid (= 0). If the check fails, specific status values indicate the exact cause:
kInvalidSignature (= 1): A signature within the certificate path could not be successfully verified.
kNoPathToTrustedCertificate (= 3): No path to a root certificate classified as trusted could be established.
kExpired (= 4): The certificate has exceeded its validity period (field notAfter).
kFuture (= 5): The validity period of the certificate has not yet begun according to field notBefore.
kRevoked (= 6): The certificate was revoked; this status results from imported CRLs or an active OCSP check via kOcspResponseCompleteChain or kOcspResponseTargetOnly.
kUnknownOcspStatus (= 7): An incorporated OCSP response returns the status "unknown" for the certificate.
kUnknownCriticalExtension (= 8): A certificate contains an unknown critical extension that was neither ignored by kIgnoreUnknownCriticalExtensions nor by prior exception handling.
If online status requests are processed in the validation process, the enumeration OcspResponseStatus[SWS_CRYPT_40001] signals the result of the protocol retrieval. In addition to a successful response confirmation (kSuccessful = 0), protocol and server-side errors can occur: invalid requests (kMalformedRequest = 1), internal errors of the issuer (kInternalError = 2), temporary overload (kTryLater = 3), the requirement of a signature (kSigRequired = 5), or missing authorization (kUnauthorized = 6).
This guide is based on the AUTOSAR Adaptive specifications for Release R25-11 for the module crypto. It was generated and curated automatically.
KI-gestützte Gruppierung auf Basis der Records und Spezifikationsauszüge; keine Gliederung aus der AUTOSAR-Spezifikation.
Class diagram
Abgerundete Rahmen = Namespace- bzw. Klassen-Scopes; hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); graue Boxen = namespace-fremde bzw. externe Basisklassen. Klicken öffnet die jeweilige Klassen- bzw. cppreference-Seite.
=1 The certificate path validation failed because a signature of a certificate in the path could not be verified.
kNoPathToTrustedCertificate
=3 The certificate path validation failed because no path to a trusted certificate could be found.
kExpired
=4 The certificate path validation failed because a certificate is expired according to the notAfter field.
kFuture
=5 The certificate path validation failed because a certificate is not valid yet according to the notBefore field.
kRevoked
=6 The certificate path validation failed because a certificate has been revoked through a previously imported CRL or through an OCSP response (if OCSP is enabled through kOcspResponseComplete Chain or kOcspResponseTargetOnly)
kUnknownOcspStatus
=7 The certificate path validation failed because a certificate state is ’unknown’ according to an OCSP response (if OCSP is enabled through kOcspResponseCompleteChain or kOcspResponseTarget Only).
kUnknownCriticalExtension
=8 The certificate path validation failed because a certificate contains an unknown critical extension that has not been excluded from validation using the kIgnoreUnknownCriticalExtensions flag or the IgnoreCriticalExtension() function
Request a governed re-review of this record. The record is not changed immediately.
gemini-3.8-flash-low· 2026-10-13 · German original