DEENESPTFRRUARHIKOZHNL

class ara::crypto::x509::CertificateValidationCtx

[SWS_CRYPT_50115] Upstream: RS_CRYPTO_02205

class CertificateValidationCtx {...};

Certificate Validation Context.

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::x509

User GuideAI-GENERATED

Used for path validation of X.509 certificates and certificate chains based on configured trust anchors.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: aa16fb2bd5c5 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Used for path validation of X.509 certificates and certificate chains based on configured trust anchors.

The class ara::crypto::x509::CertificateValidationCtx is used for validating X.509 certificates and complete certificate chains in accordance with RFC 5280 ([SWS_CRYPT_50122]). Prior to execution, the application configures the context by adding trust anchors, optional intermediate certificates, verification timestamps, and verification options, and binds OCSP responses for revocation checking as needed ([SWS_CRYPT_50117]). If OCSP responses are registered, the validation options must mandatorily define the corresponding OCSP behavior to avoid incompatibility errors during path verification. All interface methods are exception safe and designed for concurrent access.

Context

The class ara::crypto::x509::CertificateValidationCtx defines the standardized interface for validating X.509 certificates and certificate chains in accordance with RFC 5280 ([SWS_CRYPT_50122], [SWS_CRYPT_50123]). In the overall system of the AUTOSAR Adaptive Platform, it undertakes the task of demonstrating trust relationships, verifying certificate paths, and determining the status of cryptographic certificates before their use in security relationships.

The calling application serves as the central interaction partner, supplying the context with trust anchors ([SWS_CRYPT_50117]), untrusted intermediate certificates ([SWS_CRYPT_50118]), and revocation information in the form of OCSP responses ([SWS_CRYPT_50124]). The result of the validation is provided as CertificateValidationResult ([SWS_CRYPT_50122]).

CertificateValidationCtxKontext Anwendung Anwendung CertificateValidationCtx CertificateValidationCtx Anwendung->CertificateValidationCtx configures and controls CertificateValidationResult CertificateValidationResult CertificateValidationCtx->CertificateValidationResult provides verification result Certificate Certificate Certificate->CertificateValidationCtx serves as trust anchor or target of evaluation OcspResponse OcspResponse OcspResponse->CertificateValidationCtx provides revocation status

Context diagram: Integration of CertificateValidationCtx between application, input certificates, revocation checks, and result object. Sources: [SWS_CRYPT_50117], [SWS_CRYPT_50122], [SWS_CRYPT_50124].

Lifecycle

Instances of the interface are managed via the type alias Sptr ([SWS_CRYPT_50116]) as std::shared_ptr<CertificateValidationCtx>, enabling shared ownership and flexible lifetime management by the using software components. Since this is a pure virtual interface class, no public constructor exists; creation of the concrete context instance is presumably likely to occur via corresponding creation functions of a crypto stack provider implementation. Question Q-6ac4ee6766e22994 (open)

Regarding concurrency, all virtual member functions are specified as thread-safe ([SWS_CRYPT_50117], [SWS_CRYPT_50120], [SWS_CRYPT_50122]). Furthermore, all methods ensure exception safety and are declared with noexcept ([SWS_CRYPT_50117], [SWS_CRYPT_50122]). In terms of state, the context behaves as a configurable accumulator: it accepts verification parameters, certificates, and status responses, and holds them ready for validation steps.

Usage Path

Typical usage of the validation context is structured into a sequence of configuration steps followed by validation execution:

  1. Providing trust anchors: By means of AddTrustedCertificate ([SWS_CRYPT_50117]), one or more trusted certificates are added as starting points for path validation. Additional, untrusted intermediate certificates can be provided via AddUntrustedCertificate ([SWS_CRYPT_50118]).
  2. Configuring validation rules and reference time: A bitmask for controlling the verification behavior is passed via SetValidationOptions ([SWS_CRYPT_50120]). With SetCurrentTime ([SWS_CRYPT_50121]), an explicit point in time can be specified for validity checks; if this call is omitted, the context automatically uses the system time ([SWS_CRYPT_50121]). If specific, unsupported critical extensions are to be excluded from verification, their OID can be registered via IgnoreCriticalExtension ([SWS_CRYPT_50119]). This has no effect if the option kIgnoreUnknownCriticalExtensions is set ([SWS_CRYPT_50119]).
  3. Adding revocation information: One or more OCSP responses can be added via AddOcspResponse ([SWS_CRYPT_50124]). The issuer of the OCSP response must either have been previously stored as a certificate in the context, possess the extended key usage attribute id-kp-OCSPSigning of the same CA, or be passed via the optional parameter trustedOcspIssuerCertificate ([SWS_CRYPT_50124]).
  4. Perform validation: ValidateCertificate ([SWS_CRYPT_50122]) is used to verify a target certificate. Alternatively, ValidateCertificateChain ([SWS_CRYPT_50123]) validates an ordered certificate chain starting with the leaf certificate at position 0. In this process, certificates previously registered via AddUntrustedCertificate are ignored, and exclusively the passed chain is verified against the trusted certificates ([SWS_CRYPT_50123]).
Sequence of certificate validationApplicationCertificateValidationCtxAddTrustedCertificate(caCert)Result<void>SetValidationOptions(options)Result<void>optOCSP checkAddOcspResponse(ocspResp, issuerCert)Result<CertificateValidationStatus>ValidateCertificate(targetCert)Result<CertificateValidationResult::Sptrc>

Sequence diagram: Typical call sequence for configuring and validating certificates. Sources: [SWS_CRYPT_50117], [SWS_CRYPT_50120], [SWS_CRYPT_50122], [SWS_CRYPT_50124].

Error Scenarios

Error handling is performed consistently via ara::core::Result without C++ exceptions:

  • Invalid configuration options: If SetValidationOptions is called with an invalid bitmask, the call fails and returns the error code ara::crypto::CryptoErrc::kInvalidArgument with rollback semantics ([SWS_CRYPT_50120]).
  • Conflicting OCSP configuration: If at least one OCSP response was stored via AddOcspResponse without the behavior for OCSP being specified in the CertificateValidationOptions, both ValidateCertificate ([SWS_CRYPT_50122]) and ValidateCertificateChain ([SWS_CRYPT_50123]) return the error ara::crypto::CryptoErrc::kIncompatibleArguments with rollback semantics.
  • Failed OCSP validation: If the signature or origin of an OCSP response in AddOcspResponse ([SWS_CRYPT_50124]) cannot be validated against the defined criteria, the function returns the corresponding status code CertificateValidationStatus or an implementation-specific error instead of kValid.
  • Implementation-specific errors: In case of internal crypto library issues, methods such as AddTrustedCertificate ([SWS_CRYPT_50117]) or IgnoreCriticalExtension ([SWS_CRYPT_50119]) can report implementation-specific error codes in the result object.

This guide is based on the requirements of the AUTOSAR Adaptive Platform R25-11 specification.

Member map

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__crypto__x509__CertificateValidationCtx565 CertificateValidationCtx + AddOcspResponse() + AddTrustedCertificate() + AddUntrustedCertificate() + IgnoreCriticalExtension() + SetCurrentTime() + SetValidationOptions() + ValidateCertificate() + ValidateCertificateChain()

Detail view

Select an entry in the outline.

Methods

Validate and add an OCSP response to be used during certificate validation to the set of previously added OCSP responses. Multiple OCSP responses may be added to one context. In order to validate the OCSP response, the issuer of the OCSP response must have been a) set as a trusted or untrusted certificate in this context previously, or b) the CRL must have been signed by another certificate that has the id-kp-OCSPSigning extended key usage set issued by the same CA, or c) the CRL must be signed by a trusted CA passed to this function using the optional trustedOcspIssuerCertificate parameter.

virtual ara::core::Result< CertificateValidationStatus > AddOcsp Response (OcspResponse::Sptrc ocspResponse, ara::core::Optional< Certificate::Sptrc > trustedOcspIssuerCertificate) noexcept=0;

Add a trusted certificates to be used during certificate path validation to the set of previously added trusted certificates.

virtual ara::core::Result< void > AddTrustedCertificate ( Certificate::Sptrc trustedCertificate) noexcept=0;

Add an untrusted certificate to be used during certificate path validation to the set of previously added untrusted certificates.

virtual ara::core::Result< void > AddUntrustedCertificate ( Certificate::Sptrc untrustedCertificate) noexcept=0;

Configure the context to ignore an extension during validation of certificates and OCSP responses, even if the extension is marked as critical and the validation context does not support the extension. It is the responsibility of the application to validate such extensions. Multiple invocations of this function lead to ignoring all passed extensions. This function has no effect if the kIgnoreUnknownCriticalExtensions validation option is set.

virtual ara::core::Result< void > IgnoreCriticalExtension (ara::core::StringView ignoredExtensionOid) noexcept=0;

Set the reference time point to be used as the current time during certificate validation. If this function is not called, the system time will be used during certificate validation.

virtual ara::core::Result< void > SetCurrentTime (Timestamp current Time) noexcept=0;

Set validation options to be used during certificate validation.

virtual ara::core::Result< void > SetValidationOptions (Certificate ValidationOptions CertificateValidationOptions) noexcept=0;

Performs certificate path validation according to RFC 5280 and according to the previous configuration of the context.

virtual ara::core::Result< CertificateValidationResult::Sptrc > ValidateCertificate (Certificate::Sptrc certificate) noexcept=0;

Performs certificate path validation according to RFC 5280 and according to the previous configuration of the context. The function ignores any certificates added to the context via Add UntrustedCertificate. Instead, the function validates the provided chain against any trusted certificate that has been set using the function AddTrustedCertificate.

virtual ara::core::Result< CertificateValidationResult::Sptrc > ValidateCertificateChain (const ara::core::Span< Certificate::Sptrc > certificateChain) noexcept=0;

Type aliases

Sptr type alias

Smart pointer of the interface.

Method documentation

function AddOcspResponse [SWS_CRYPT_50124] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< CertificateValidationStatus > AddOcsp Response (OcspResponse::Sptrc ocspResponse, ara::core::Optional< Certificate::Sptrc > trustedOcspIssuerCertificate) noexcept=0;

Validate and add an OCSP response to be used during certificate validation to the set of previously added OCSP responses. Multiple OCSP responses may be added to one context. In order to validate the OCSP response, the issuer of the OCSP response must have been a) set as a trusted or untrusted certificate in this context previously, or b) the CRL must have been signed by another certificate that has the id-kp-OCSPSigning extended key usage set issued by the same CA, or c) the CRL must be signed by a trusted CA passed to this function using the optional trustedOcspIssuerCertificate parameter.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8459f26838c0 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The method AddOcspResponse of the class ara::crypto::x509::CertificateValidationCtx validates a passed OCSP response (ocspResponse) and, if valid, adds it to the set of already stored OCSP responses in the validation context [SWS_CRYPT_50124]. Multiple responses can be added to a context [SWS_CRYPT_50124]. Via the optional parameter trustedOcspIssuerCertificate, a specific certificate can be passed that is considered trusted during the check of the OCSP response; if this parameter is omitted, the validation draws on the certificates previously configured by means of AddTrustedCertificate [SWS_CRYPT_50124].

The synchronous call returns a ara::core::Result<CertificateValidationStatus>, which contains the status kValid upon successful acceptance or otherwise represents the result of the OCSP validation or an error [SWS_CRYPT_50124].

Error handling

The specification does not define any standardized error codes for this call [SWS_CRYPT_50124]. If the operation fails, either the corresponding validation status is conveyed in the result or an implementation-specific error is signaled via the Result object [SWS_CRYPT_50124].

Concurrency and Limitations

The operation is specified as thread-safe and exception-safe [SWS_CRYPT_50124]. For the validation of the OCSP response to succeed, one of the following conditions must be met [SWS_CRYPT_50124]:

  • The issuer was previously stored in the context as a trusted or untrusted certificate [SWS_CRYPT_50124].
  • The signature originates from a certificate with set extension id-kp-OCSPSigning of the same certificate authority (CA) [SWS_CRYPT_50124].
  • The signature originates from a trusted CA that was passed directly via trustedOcspIssuerCertificate [SWS_CRYPT_50124].

Interaction

The registered OCSP responses are incorporated into downstream validation checks, such as those performed by [SWS_CRYPT_50122] (ValidateCertificate) and [SWS_CRYPT_50123] (ValidateCertificateChain). Interpretation: The OCSP responses likely have to be added before starting the path validation so that the revocation status of the certificates can be taken into account. Question Q-fbb0711617fd7895 (open)

This text was generated by an AI based on the specification data.

Implementer's Guide to follow (complexity I2)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
ocspResponseThe OCSP response to be used during certificate validation.
trustedOcspIssuerCertificateIf provided, the certificate to be considered trusted during validation of the OCSP response. If not provided, the certificates added via AddTrustedCertificate are considered trusted.

Rückgabewert

TypBeschreibung
ara::core::Result<CertificateValidationStatus >a result containing kValid if the response was added, or the result of the OCSP response validation, or an implementation specific error otherwise.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50124
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50124@rel:R25-11#802cfd8b
Content hash
802cfd8b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50124
Status: valid/unmigrated Version: rel:R25-11#802cfd8b Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50124@rel:R25-11#802cfd8b
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function AddTrustedCertificate [SWS_CRYPT_50117] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< void > AddTrustedCertificate ( Certificate::Sptrc trustedCertificate) noexcept=0;

Add a trusted certificates to be used during certificate path validation to the set of previously added trusted certificates.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 715eb0a30fe3 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method AddTrustedCertificate of class ara::crypto::x509::CertificateValidationCtx adds another certificate to the set of trusted certificates for subsequent validations [SWS_CRYPT_50117].

use

The call is made via the interface in ara/crypto/x509/certificate_validation_ctx.h. As parameter, trustedCertificate of type Certificate::Sptrc is passed, which is considered trusted during certificate path validation [SWS_CRYPT_50117]. Upon successful execution, the function returns an empty ara::core::Result<void> [SWS_CRYPT_50117].

Error handling

The specification defines no standardized error codes for this function [SWS_CRYPT_50117]. If an error occurs during processing, an implementation-specific error is reported via the ara::core::Result [SWS_CRYPT_50117].

Concurrency and Limitations

The method is declared as noexcept=0, is considered exception safe (exception safe), and is explicitly specified as thread-safe (thread-safe) [SWS_CRYPT_50117].

Interaction

The registered trusted certificates interact with other functions of the validation context:

  • In ValidateCertificateChain, a certificate chain is validated according to RFC 5280 against the trusted certificates previously stored via AddTrustedCertificate, while untrusted certificates are ignored [SWS_CRYPT_50123].
  • In AddOcspResponse, a trusted certificate previously set in the context can be used as an issuer to check the validity of the OCSP response [SWS_CRYPT_50124].

This usage note was generated automatically based on the R25-11 specification state.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
trustedCertificatea certificate to be considered trusted during certificate path validation.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success, or an implementation specific error.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50117
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50117@rel:R25-11#d31aab33
Content hash
d31aab33
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50117
Status: valid/unmigrated Version: rel:R25-11#d31aab33 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50117@rel:R25-11#d31aab33
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function AddUntrustedCertificate [SWS_CRYPT_50118] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< void > AddUntrustedCertificate ( Certificate::Sptrc untrustedCertificate) noexcept=0;

Add an untrusted certificate to be used during certificate path validation to the set of previously added untrusted certificates.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1896ca7ced68 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method AddUntrustedCertificate of context type ara::crypto::x509::CertificateValidationCtx adds an untrusted certificate to the set of previously registered certificates so that it can be taken into account during certificate path validation [SWS_CRYPT_50118]. Inclusion is done via header file #include "ara/crypto/x509/certificate_validation_ctx.h" [SWS_CRYPT_50118]. A smart pointer to the certificate to be considered (Certificate::Sptrc untrustedCertificate) is passed as a parameter [SWS_CRYPT_50118]. Since the method immediately returns an ara::core::Result<void>, the registration should presumably be handled synchronously [SWS_CRYPT_50118]. Question Q-879b384ff6efe687 (open)

Regarding error handling, AUTOSAR specifies no standardized error codes for this interface [SWS_CRYPT_50118]. In the success case, the returned ara::core::Result contains no value (void); in the error case, it returns an implementation-specific error code [SWS_CRYPT_50118]. Callers must therefore check the result object for errors before further use of the validation context. The method is declared as noexcept and classified as exception-safe (exception safe), meaning that no C++ exceptions are propagated across the interface boundary [SWS_CRYPT_50118].

The operation is explicitly declared as thread-safe (thread-safe) [SWS_CRYPT_50118]. Multiple threads can thus concurrently feed certificates into the same validation context. The call should reasonably take place before the start of path validation to ensure that all required certificates are available for the validation algorithm [SWS_CRYPT_50118].

This usage note was generated by an AI and is based on the specification status of AUTOSAR R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
untrustedCertificatea certificate to be considered untrusted during certificate path validation.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success, or an implementation specific error.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50118
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50118@rel:R25-11#6956d0c9
Content hash
6956d0c9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50118
Status: valid/unmigrated Version: rel:R25-11#6956d0c9 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50118@rel:R25-11#6956d0c9
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function IgnoreCriticalExtension [SWS_CRYPT_50119] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< void > IgnoreCriticalExtension (ara::core::StringView ignoredExtensionOid) noexcept=0;

Configure the context to ignore an extension during validation of certificates and OCSP responses, even if the extension is marked as critical and the validation context does not support the extension. It is the responsibility of the application to validate such extensions. Multiple invocations of this function lead to ignoring all passed extensions. This function has no effect if the kIgnoreUnknownCriticalExtensions validation option is set.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 7db4b0cd4a9e Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The method IgnoreCriticalExtension on [SWS_CRYPT_50119] configures the instance of ara::crypto::x509::CertificateValidationCtx so that a specific certificate extension is ignored during the verification of certificates and OCSP responses. This also applies if the extension is marked as critical and is not originally supported by the validation context. Parameter ignoredExtensionOid accepts the OID of the extension to be ignored as ara::core::StringView. Multiple calls result in all passed extension OIDs being ignored. Execution is synchronous and declared as noexcept.

Error Handling and Concurrency

The function specifies no standardized error codes; in the success case, it returns an empty ara::core::Result<void>, whereas in the error case, an implementation-specific error code is contained [SWS_CRYPT_50119]. Regarding concurrency, the interface is specified as thread-safe (thread-safe) and exception-safe (exception safe).

Restrictions and Interaction

If a critical extension is ignored, the functional validation of this extension is entirely the responsibility of the application [SWS_CRYPT_50119]. If the validation option kIgnoreUnknownCriticalExtensions is set, the call has no additional effect. Ignoring unsupported critical extensions should prevent subsequent path verification within [SWS_CRYPT_40203] (for instance, when determining the CertificateValidationStatus) from failing. Question Q-a087c9a9543c092a (open)

This text was created by an AI.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
ignoredExtensionOidthe OID of the extension to be ignored during certificate and OCSP response validation

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success, or an implementation specific error.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50119
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50119@rel:R25-11#fedabb0a
Content hash
fedabb0a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50119
Status: valid/unmigrated Version: rel:R25-11#fedabb0a Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50119@rel:R25-11#fedabb0a
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function SetCurrentTime [SWS_CRYPT_50121] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< void > SetCurrentTime (Timestamp current Time) noexcept=0;

Set the reference time point to be used as the current time during certificate validation. If this function is not called, the system time will be used during certificate validation.

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
currentTimeThe time point to be used as the current time during certificate validation.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success, or an implementation specific error.

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50121
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50121@rel:R25-11#9a207572
Content hash
9a207572
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50121
Status: valid/unmigrated Version: rel:R25-11#9a207572 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50121@rel:R25-11#9a207572
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function SetValidationOptions [SWS_CRYPT_50120] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< void > SetValidationOptions (Certificate ValidationOptions CertificateValidationOptions) noexcept=0;

Set validation options to be used during certificate validation.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e7e89f73aaa9 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

According to [SWS_CRYPT_50120], the method SetValidationOptions of class ara::crypto::x509::CertificateValidationCtx is used to define the options for performing a certificate validation. As parameter, the pure virtual function expects CertificateValidationOptions, a bitmask for identifying the desired validation options. The call is provided via the header ara/crypto/x509/certificate_validation_ctx.h.

Error handling

According to [SWS_CRYPT_50120], the interface returns a ara::core::Result<void>. Upon successful execution, the result contains no value (empty result). If an invalid value is passed for the options, the operation fails with the error code ara::crypto::CryptoErrc::kInvalidArgument. Here, rollback semantics apply. If another error occurs, an implementation-specific error code can be returned.

Concurrency and Limitations

According to [SWS_CRYPT_50120], the method is specified as thread-safe (thread-safe) and may be called concurrently. It is also declared as exception-safe (exception safe) as well as with noexcept, which is why no exceptions may be thrown across the interface boundary.

This text was generated by an AI based on AUTOSAR R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
CertificateValidationOptionsA bitmask identifying validation options. The semantics of each option is specified in the CertificateValidationOptions type.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success, or an implementation specific error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics an invalid CertificateValidationOptions has been provided

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50120
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50120@rel:R25-11#ffc647e8
Content hash
ffc647e8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50120
Status: valid/unmigrated Version: rel:R25-11#ffc647e8 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50120@rel:R25-11#ffc647e8
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ValidateCertificate [SWS_CRYPT_50122] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< CertificateValidationResult::Sptrc > ValidateCertificate (Certificate::Sptrc certificate) noexcept=0;

Performs certificate path validation according to RFC 5280 and according to the previous configuration of the context.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8c454149c627 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method ValidateCertificate of the class ara::crypto::x509::CertificateValidationCtx from the header ara/crypto/x509/certificate_validation_ctx.h performs a synchronous certificate path validation according to RFC 5280 [SWS_CRYPT_50122]. The validation check is performed based on the prior configuration of the instance context. As the only input parameter, the certificate to be validated is passed via the pointer certificate of type Certificate::Sptrc [SWS_CRYPT_50122].

ara::core::Result<CertificateValidationResult::Sptrc> serves as the return type, which contains a pointer to the validation result in the event of success or provides an error code in the event of an error [SWS_CRYPT_50122]. In addition to implementation-specific errors, the specific error code ara::crypto::CryptoErrc::kIncompatibleArguments can occur [SWS_CRYPT_50122]. This has rollback semantics and is returned if an OCSP response was stored by means of AddOcspResponse, but the configured CertificateValidationOptions do not specify any OCSP behavior.

Regarding execution safety and concurrency, the method is specified as thread-safe (thread-safe) as well as exception-safe (exception safe) and does not throw any exceptions (noexcept) [SWS_CRYPT_50122]. As an ordering prerequisite, it must be noted that the validation context must be initialized and configured beforehand, as the check builds directly on its presets [SWS_CRYPT_50122].

This usage note is based on the AUTOSAR Adaptive Platform R25-11 specification.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
certificateThe certificate to be validated.

Rückgabewert

TypBeschreibung
ara::core::Result<CertificateValidationResult::Sptrc >The result of the certificate validation, or an implementation specific error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if an OCSP response has been set via AddOcspResponse, but the CertificateValidationOptions do not specify the OCSP behavior.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50122
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50122@rel:R25-11#9b4a138d
Content hash
9b4a138d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50122
Status: valid/unmigrated Version: rel:R25-11#9b4a138d Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50122@rel:R25-11#9b4a138d
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ValidateCertificateChain [SWS_CRYPT_50123] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< CertificateValidationResult::Sptrc > ValidateCertificateChain (const ara::core::Span< Certificate::Sptrc > certificateChain) noexcept=0;

Performs certificate path validation according to RFC 5280 and according to the previous configuration of the context. The function ignores any certificates added to the context via Add UntrustedCertificate. Instead, the function validates the provided chain against any trusted certificate that has been set using the function AddTrustedCertificate.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3d06a1d393b7 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method ValidateCertificateChain in the context ara::crypto::x509::CertificateValidationCtx performs a synchronous path validation of a certificate chain according to RFC 5280 [SWS_CRYPT_50123].

Usage and Parameters

As input, the function expects a chain of type ara::core::Span<Certificate::Sptrc> via the parameter certificateChain. Here, element 0 represents the leaf certificate, whereas each subsequent element must contain the issuer of the respective preceding certificate [SWS_CRYPT_50123]. The function ignores certificates that were previously registered via AddUntrustedCertificate, and validates the passed chain exclusively against trust anchors deposited via AddTrustedCertificate [SWS_CRYPT_50123].

Error handling

The result is provided encapsulated as ara::core::Result<CertificateValidationResult::Sptrc>, which contains either a pointer to the validation result or an error code [SWS_CRYPT_50123]. The error ara::crypto::CryptoErrc::kIncompatibleArguments occurs with rollback semantics if an OCSP response was previously set via AddOcspResponse, but the current CertificateValidationOptions do not define any OCSP behavior [SWS_CRYPT_50123]. Other error causes are reported back as implementation-specific error codes [SWS_CRYPT_50123].

Concurrency and Execution Safety

The interface is declared as noexcept, is considered exception safe, and is classified as thread-safe for concurrent access [SWS_CRYPT_50123].

This text was generated by an AI and serves for technical orientation.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
certificateChainThe certificate chain to be validated. Element 0 contains the leaf certificate and each subsequent certificate contains the issuer of the previous certificate.

Rückgabewert

TypBeschreibung
ara::core::Result<CertificateValidationResult::Sptrc >The result of the certificate validation, or an implementation specific error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if an OCSP response has been set via AddOcspResponse, but the CertificateValidationOptions do not specify the OCSP behavior.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50123
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50123@rel:R25-11#2fc9935e
Content hash
2fc9935e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50123
Status: valid/unmigrated Version: rel:R25-11#2fc9935e Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50123@rel:R25-11#2fc9935e
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Type alias documentation

type alias Sptr [SWS_CRYPT_50116] Upstream: RS_CRYPTO_02205

using Sptr = std::shared_ptr<CertificateValidationCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/x509/certificate_validation_ctx.h"
Scopeclass ara::crypto::x509::CertificateValidationCtx
SymbolSptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50116@rel:R25-11#57ba261f
Content hash
57ba261f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50116
Status: valid/unmigrated Version: rel:R25-11#57ba261f Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50116@rel:R25-11#57ba261f
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill