DEENESPTFRRUARHIKOZHNL

class ara::crypto::x509::CertificateValidationResult

[SWS_CRYPT_50179] Upstream: RS_CRYPTO_02306

class CertificateValidationResult {...};

X.509 Certificate Validation Result.

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

User GuideAI-GENERATED

Provides results of X.509 certificate validations with status, found certificate chain, and failed certificate.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1ece3477b66c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Provides results of X.509 certificate validations with status, found certificate chain, and failed certificate.

The interface ara::crypto::x509::CertificateValidationResult provides the result of an X.509 certificate validation and is typically managed as an immutable Sptrc [SWS_CRYPT_50093]. Via its methods, the application queries the overall status, determines the complete certificate chain with the leaf certificate at position 0, or isolates the failed certificate. If the validation was successful, the call to determine the erroneous certificate fails with the error code ara::crypto::CryptoErrc::kNoSuchValue [SWS_CRYPT_50095]. All interface methods are designed to be thread-safe and exception-safe.

Context

The interface ara::crypto::x509::CertificateValidationResult encapsulates the result of an X.509 certificate validation process within the Adaptive module crypto. Its primary responsibility is to provide calling applications with a structured and consistent verification result. This includes both the aggregated validation status of the certificate path and access to the participating certificate objects. Acting as an intermediary between the internal cryptographic verification mechanisms and safety-critical applications, the class enables a differentiated evaluation of certificate hierarchies. Its central interaction partners include instances of Certificate::Sptrc, which are either assembled as a complete certificate chain or identified as the cause of the failure in case of an error.

Lifecycle

As a pure virtual interface, CertificateValidationResult defines no public constructors of its own. Lifetime and ownership are decisively controlled by the typed smart pointer Sptrc, which is defined as std::shared_ptr<const CertificateValidationResult> [SWS_CRYPT_50093]. This constant pointer establishes a shared, immutable ownership model: after completion of a certificate validation, the result object is provided as an unmodifiable snapshot. Creation and initialization of concrete instances are likely performed internally by higher-level validation functions of the platform backend. Question Q-a5580dcf443b0905 (open) Since all member functions are declared as const and noexcept and explicitly specified as thread-safe and exception-safe ([SWS_CRYPT_50094], [SWS_CRYPT_50095], [SWS_CRYPT_50096]), multiple threads can access the same instance concurrently and without additional synchronization measures until the last reference is released.

Usage Path

A typical usage path starts after receiving a CertificateValidationResult::Sptrc instance from a preceding certificate validation. Callers carry out the evaluation in a standardized sequence:

  • First, the application calls GetValidationStatus() to query the basic result of the certificate validation as CertificateValidationStatus [SWS_CRYPT_50094].
  • If the validation was successful, the client calls GetCertificateChain() to retrieve the certificate chain found during the verification process as ara::core::Vector<Certificate::Sptrc> [SWS_CRYPT_50096]. According to the specification, this chain always begins at index position 0 with the leaf certificate [SWS_CRYPT_50096].
  • If, on the other hand, path validation failed, the caller calls GetFailedCertificate() to specifically identify the certificate that triggered the validation error [SWS_CRYPT_50095].
Query of validation resultApplicationCertificateValidationResultGetValidationStatus()Result<CertificateValidationStatus>altValidierung erfolgreich (kValid)GetCertificateChain()Result<Vector<Certificate::Sptrc>>Validierung fehlgeschlagenGetFailedCertificate()Result<Certificate::Sptrc>

Sequence diagram: Typical sequence for querying validation status, certificate chain, and error cause. Sources: [SWS_CRYPT_50094], [SWS_CRYPT_50095], [SWS_CRYPT_50096]

Error Scenarios

The error management of the interface relies on ara::core::Result, with all calls maintaining the noexcept guarantee and being exception-safe:

  • Successful validation and GetFailedCertificate(): When the verification has completed successfully (return value kValid), no certificate caused a failure. In this state, calling GetFailedCertificate() fails with the error code ara::crypto::CryptoErrc::kNoSuchValue [SWS_CRYPT_50095]. Applications must interpret this error as a logical confirmation of an error-free chain or couple the call to a negative status.
  • Implementation-specific status errors: No standardized error codes are defined for GetValidationStatus(), but implementation-specific errors are encapsulated in the returned ara::core::Result [SWS_CRYPT_50094].
  • Certificate chain query: GetCertificateChain() also does not specify any standardized error codes [SWS_CRYPT_50096]; any internal error states are signaled via the resulting ara::core::Result.

This guide is based exclusively on the AUTOSAR Adaptive specification for the crypto module in release R25-11.

Member map

Class diagram

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

G nara__crypto__x509__CertificateValidationResult372 CertificateValidationResult + GetCertificateChain() + GetFailedCertificate() + GetValidationStatus()

Detail view

Select an entry in the outline.

Methods

Get the certificate chain found during certificate validation.

virtual ara::core::Result< ara::core::Vector< Certificate::Sptrc > > GetCertificateChain () const noexcept=0;

Get the certificate that caused the certificate path validation to fail.

virtual ara::core::Result< Certificate::Sptrc > GetFailedCertificate () const noexcept=0;

Get the result of the certificate validation.

virtual ara::core::Result< CertificateValidationStatus > GetValidation Status () const noexcept=0;

Type aliases

Sptrc type alias

Smart pointer of the interface.

Method documentation

function GetCertificateChain [SWS_CRYPT_50096] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< ara::core::Vector< Certificate::Sptrc > > GetCertificateChain () const noexcept=0;

Get the certificate chain found during certificate validation.

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

use

The method GetCertificateChain of class ara::crypto::x509::CertificateValidationResult is provided via header #include "ara/crypto/x509/certificate_validation_result.h" [SWS_CRYPT_50096]. It serves to synchronously retrieve the certificate chain found during the course of a certificate validation [SWS_CRYPT_50096].

The interface expects no parameters and synchronously returns an ara::core::Result<ara::core::Vector<Certificate::Sptrc>> [SWS_CRYPT_50096]. The resulting vector contains smart pointers to the certificates of the validated chain, starting with the leaf certificate at index position 0 [SWS_CRYPT_50096].

Error handling

No standardized errors are specified for this function [SWS_CRYPT_50096]. Interpretation: Because the return value is nevertheless typed as ara::core::Result, occurring error cases should be attributable exclusively to vendor-specific implementation details. Question Q-967fe725a5505c11 (open)

Concurrency and Limitations

The method is declared as a pure virtual function, identified as const as well as noexcept, and explicitly specified as thread-safe as well as exception safe [SWS_CRYPT_50096]. Parallel calls on the same instance are thus safely possible without external synchronization.

Interaction

The function fulfills the overarching requirement [RS_CRYPTO_02306] in module crypt of the Adaptive Platform [SWS_CRYPT_50096].

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

Implementer's Guide to follow (complexity I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::Vector<Certificate::Sptrc > >A vector containing the found certificate chain, beginning with the leaf certificate at position 0.

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_50096
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50096@rel:R25-11#f119a26e
Content hash
f119a26e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50096
Status: valid/unmigrated Version: rel:R25-11#f119a26e 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_50096@rel:R25-11#f119a26e
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 GetFailedCertificate [SWS_CRYPT_50095] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< Certificate::Sptrc > GetFailedCertificate () const noexcept=0;

Get the certificate that caused the certificate path validation to fail.

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

use

The synchronous interface method GetFailedCertificate of class ara::crypto::x509::CertificateValidationResult serves to selectively retrieve that certificate which caused the failure of a certificate path validation [SWS_CRYPT_50095]. The function is available via the header file ara/crypto/x509/certificate_validation_result.h and is called without input parameters [SWS_CRYPT_50095]. As a return value, it provides a result object of type ara::core::Result<Certificate::Sptrc>, which encapsulates a smart pointer to the error-causing certificate in the success case [SWS_CRYPT_50095].

Error handling

If, however, the preceding validation of the certificate path was successful (result kValid), consequently no certificate caused a validation error [SWS_CRYPT_50095]. In this constellation, GetFailedCertificate reports an error and returns the specific error code ara::crypto::CryptoErrc::kNoSuchValue with documented rollback semantics in the result object [SWS_CRYPT_50095]. Calling components must therefore strictly check whether the ara::core::Result contains an error code before accessing the pointer of the certificate in order to prevent faulty accesses.

Concurrency and Limitations

The member function is declared as a pure query operation with the modifiers const and noexcept [SWS_CRYPT_50095]. According to the specification requirements, it is implemented completely exception-safe (exception safe) and thread-safe (thread-safe) [SWS_CRYPT_50095]. Therefore, the method can be called safely and concurrently from multiple threads without additional synchronization measures.

This text was created by an AI and is based on the AUTOSAR R25-11 specification.

Implementer's Guide to follow (complexity I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result<Certificate::Sptrc >A result containing the certificate that caused the certificate path validation to fail

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kNoSuchValuerollback_semantics if the certificate validation returned kValid, i.e., no certificate caused the validation to fail.

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50095
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50095@rel:R25-11#a460c4b9
Content hash
a460c4b9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50095
Status: valid/unmigrated Version: rel:R25-11#a460c4b9 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_50095@rel:R25-11#a460c4b9
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 GetValidationStatus [SWS_CRYPT_50094] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< CertificateValidationStatus > GetValidation Status () const noexcept=0;

Get the result of the certificate validation.

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

use

The method GetValidationStatus serves to synchronously retrieve the validation result of a certificate verification [SWS_CRYPT_50094]. It is declared as a pure virtual, const member function of interface ara::crypto::x509::CertificateValidationResult and included via header ara/crypto/x509/certificate_validation_result.h [SWS_CRYPT_50094]. The function takes no input parameters and returns an ara::core::Result<CertificateValidationStatus>, which encapsulates the status of the certificate validation in the success case [SWS_CRYPT_50094].

Error handling

No standardized error codes are specified for GetValidationStatus [SWS_CRYPT_50094]. If evaluation or determination of the status fails, the returned ara::core::Result instead contains an implementation-specific error code [SWS_CRYPT_50094]. Callers must therefore always check the result object for error states before accessing the actual status value.

Concurrency and Limitations

The operation is specified as noexcept as well as explicitly thread-safe (thread-safe) and exception-safe (exception safe) [SWS_CRYPT_50094]. It can thus be called safely concurrently from different threads on the same instance without requiring additional synchronization mechanisms.

This usage note was generated automatically based on the specification of AUTOSAR Adaptive R25-11.

Implementer's Guide to follow (complexity I2)

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

Rückgabewert

TypBeschreibung
ara::core::Result<CertificateValidationStatus >The result of the certificate validation, 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_50094
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50094@rel:R25-11#e76328ae
Content hash
e76328ae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50094
Status: valid/unmigrated Version: rel:R25-11#e76328ae 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_50094@rel:R25-11#e76328ae
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 Sptrc [SWS_CRYPT_50093] Upstream: RS_CRYPTO_02306

using Sptrc = std::shared_ptr<const CertificateValidationResult>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/x509/certificate_validation_result.h"
Scopeclass ara::crypto::x509::CertificateValidationResult
SymbolSptrc

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50093
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50093@rel:R25-11#0adf21c8
Content hash
0adf21c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50093
Status: valid/unmigrated Version: rel:R25-11#0adf21c8 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_50093@rel:R25-11#0adf21c8
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