DEENESPTFRRUARHIKOZHNL

class ara::crypto::x509::OcspResponse

[SWS_CRYPT_50129] Upstream: RS_CRYPTO_02306

class OcspResponse {...};

Interface of OcspResponse.

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

User GuideAI-GENERATED

Provides the status of an OCSP response for certificate verification as well as certificates contained therein.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 79f06589ab79 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Provides the status of an OCSP response for certificate verification as well as certificates contained therein.

The interface ara::crypto::x509::OcspResponse encapsulates the response of an OCSP query for checking the certificate status in AUTOSAR Adaptive. Callers typically first check the status of the response via GetResponseStatus() [SWS_CRYPT_50130] and subsequently retrieve the contained certificates using GetCertificates() [SWS_CRYPT_50131]. Access is concurrency-safe and exception-safe via shared smart pointers to immutable instances (Sptrc) [SWS_CRYPT_40802].

Context

In the crypto module of the AUTOSAR Adaptive Platform, the interface ara::crypto::x509::OcspResponse encapsulates the data of a response conforming to the Online Certificate Status Protocol (OCSP). Its primary responsibility is to provide the validity and revocation status of X.509 certificates to applications and security functions. Unlike static certificate revocation lists (CRLs), OCSP enables timely status queries for individual certificates from a validation service.

In the crypto architecture, the interface acts as an information source for calling components such as authentication services or TLS protocol stacks. It provides methods both to query the high-level response status of the OCSP message [SWS_CRYPT_50130] and to read out the certificates transported in the response [SWS_CRYPT_50131]. In this way, communication peers can immediately verify the validity of certificate chains.

Lifecycle

As a purely virtual interface, ara::crypto::x509::OcspResponse does not define any public constructors or custom factory methods. Instantiation typically occurs platform-internally via the driver and provider components of the crypto stack, which parse received raw data of the OCSP response (interpretation: concrete instances are created by underlying X.509 providers). Question Q-30d53aa886333cbc (open)

For passing and managing instances, the class specifies the type alias Sptrc as std::shared_ptr<const OcspResponse> [SWS_CRYPT_40802]. This smart pointer establishes a shared ownership model with strict read-only access. The lifetime of the object is governed via the reference counting of the shared pointer and terminates automatically as soon as the last reference is released.

With respect to concurrency and fault tolerance, the methods GetResponseStatus [SWS_CRYPT_50130] and GetCertificates [SWS_CRYPT_50131] are declared as exception-safe (exception safe) and thread-safe (thread-safe). Since only constant access is granted via Sptrc [SWS_CRYPT_40802], multiple threads can access the same OCSP response instance concurrently and without external locks.

Usage Path

The typical sequence for evaluating an OCSP response comprises checking the status and subsequently retrieving embedded certificates:

  1. Query status: The caller first invokes GetResponseStatus() [SWS_CRYPT_50130]. The method returns a ara::core::Result<OcspResponseStatus> indicating whether the response was generated successfully or a protocol error occurred.
  2. Check result: The application checks the Result object. Only if the OCSP response is marked as successful is the evaluation of further payload data sensible.
  3. Obtain certificates: The application then calls GetCertificates() [SWS_CRYPT_50131]. Here, a ara::core::Result<ara::core::Vector<Certificate::Sptrc>> is returned that encapsulates all certificates contained in the OCSP response.
  4. Perform verification: The extracted certificates presumably serve to validate the signature of the OCSP response or the certificate chain of the responder (interpretation: certificates support the authenticity verification of the OCSP data). Question Q-4f4a5f1b72358a1f (open)
Typical usage path of an OcspResponseApplicationOcspResponseGetResponseStatus()Result<OcspResponseStatus>optStatus erfolgreichGetCertificates()Result<Vector<Certificate::Sptrc>>

Sequence diagram: Typical sequence for querying the OCSP response status and fetching contained certificates. Sources: [SWS_CRYPT_50130], [SWS_CRYPT_50131].

Error Scenarios

Both methods of the interface use ara::core::Result as a synchronous return type and are annotated with the identifier noexcept, which precludes throwing synchronous C++ exceptions [SWS_CRYPT_50130] [SWS_CRYPT_50131].

For GetResponseStatus() [SWS_CRYPT_50130] and GetCertificates() [SWS_CRYPT_50131], the AUTOSAR specification explicitly defines no standardized error codes. Possible error causes—such as parsing errors or platform-internal memory shortages—are reported in an implementation-specific manner via the error object of ara::core::Result. The existence of a valid pointer of type OcspResponse::Sptrc [SWS_CRYPT_40802] serves as a precondition, since access via null pointers would cause undefined behavior.

This guide was generated by an AI based on the AUTOSAR specification R25-11 for the crypto module.

Member map

Class diagram

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

G nara__crypto__x509__OcspResponse358 OcspResponse + GetCertificates() + GetResponseStatus()

Detail view

Select an entry in the outline.

Methods

Get the certificates contained in the OCSP response.

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

Get the OCSP response status.

virtual ara::core::Result< OcspResponseStatus > GetResponseStatus () const noexcept=0;

Type aliases

Sptrc type alias

Shared smart pointer of the interface.

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

Method documentation

function GetCertificates [SWS_CRYPT_50131] Upstream: RS_CRYPTO_02306

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

Get the certificates contained in the OCSP response.

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

use

The method GetCertificates of interface ara::crypto::x509::OcspResponse ([SWS_CRYPT_50131]) serves to synchronously retrieve all certificates embedded in a received OCSP response. The call is made without parameters on an instance of OcspResponse via header ara/crypto/x509/ocsp_response.h ([SWS_CRYPT_50131]). As a return value, the function provides an ara::core::Result<ara::core::Vector<Certificate::Sptrc>> ([SWS_CRYPT_50131]) that, upon successful execution, provides a vector with smart pointers to the contained certificate objects.

Error handling

According to the specification, the function defines no standardized error codes ([SWS_CRYPT_50131]). Interpretation: Due to the encapsulation in return type ara::core::Result, a caller should nevertheless have to check for any implementation-specific error states, even though AUTOSAR does not foresee standardized errors for this method ([SWS_CRYPT_50131]). Question Q-d37b6b547d25b17f (open)

Concurrency and Limitations

The interface definition designates GetCertificates as const and noexcept ([SWS_CRYPT_50131]). In addition, the function is specified as thread-safe and exception-safe ([SWS_CRYPT_50131]). Callers can therefore execute the method concurrently in parallel from multiple threads without external synchronization mechanisms being required.

This text was automatically generated based on the AUTOSAR specifications.

Implementer's Guide to follow (complexity I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::Vector<Certificate::Sptrc > >A Vector containing the certificates contained in the OCSP response.

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

virtual ara::core::Result< OcspResponseStatus > GetResponseStatus () const noexcept=0;

Get the OCSP response status.

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

Rückgabewert

TypBeschreibung
ara::core::Result< OcspResponseStatus >The OCSP response status.

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_50130
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50130@rel:R25-11#4ececdd1
Content hash
4ececdd1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50130
Status: valid/unmigrated Version: rel:R25-11#4ececdd1 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_50130@rel:R25-11#4ececdd1
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_40802] Upstream: RS_CRYPTO_02306

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

Shared smart pointer of the interface.

Header-Datei#include "ara/crypto/x509/ocsp_response.h"
Scopeclass ara::crypto::x509::OcspResponse
SymbolSptrc

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

Record
AUTOSAR/AP/record/SWS_CRYPT_40802
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_40802@rel:R25-11#9b089d12
Content hash
9b089d12
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_40802
Status: valid/unmigrated Version: rel:R25-11#2a890aa7 Versionshistorie & Revisions (1 transition, 8 revision)
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_40802@rel:R25-11#2a890aa7
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#9b089d122026-09-30
  • R19-11rel:R19-11#a479fd722026-10-14
  • R20-11rel:R20-11#e7a38ae12026-10-14
  • R21-11rel:R21-11#e7a38ae12026-10-14
  • R22-11rel:R22-11#3b79a0252026-10-14
  • R23-11rel:R23-11#b03460092026-10-14
  • R24-11rel:R24-11#fcfb189f2026-10-14
  • R25-11rel:R25-11#2a890aa72026-10-14 active
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