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.
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-OCSPSigningof 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" |
|---|---|
| Scope | class ara::crypto::x509::CertificateValidationCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| ocspResponse | The OCSP response to be used during certificate validation. |
| trustedOcspIssuerCertificate | If 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
| Typ | Beschreibung |
|---|---|
| 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
| Fehlercode | Beschreibung |
|---|---|
| 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
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · German original