función 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.
usar
El método AddOcspResponse de la clase ara::crypto::x509::CertificateValidationCtx valida una respuesta OCSP transmitida (ocspResponse) y, si es válida, la añade al conjunto de respuestas OCSP ya depositadas en el contexto de validación [SWS_CRYPT_50124]. Se pueden añadir varias respuestas a un contexto [SWS_CRYPT_50124]. Mediante el parámetro opcional trustedOcspIssuerCertificate se puede transmitir un certificado específico que se considera de confianza durante la verificación de la respuesta OCSP; si se omite este parámetro, la validación recurre a los certificados configurados previamente mediante AddTrustedCertificate [SWS_CRYPT_50124].
La llamada síncrona devuelve un ara::core::Result<CertificateValidationStatus> que, en caso de adopción correcta, contiene el estado kValid o, en caso contrario, refleja el resultado de la validación OCSP o bien un error [SWS_CRYPT_50124].
Manejo de errores
La especificación no define códigos de error estandarizados para esta llamada [SWS_CRYPT_50124]. Si la operación falla, se transmite el estado de validación correspondiente en el resultado o se señaliza un error específico de la implementación a través del objeto Result [SWS_CRYPT_50124].
Concurrencia y restricciones
La operación está especificada como thread-safe y exception-safe [SWS_CRYPT_50124]. Para que la validación de la respuesta OCSP tenga éxito, debe cumplirse una de las siguientes condiciones [SWS_CRYPT_50124]:
- El emisor se depositó previamente en el contexto como certificado de confianza o no de confianza [SWS_CRYPT_50124].
- La firma proviene de un certificado con la extensión
id-kp-OCSPSigningestablecida de la misma autoridad de certificación (CA) [SWS_CRYPT_50124]. - La firma proviene de una CA de confianza que se transmitió directamente a través de
trustedOcspIssuerCertificate[SWS_CRYPT_50124].
Interacción
Las respuestas OCSP registradas se incorporan a las verificaciones de validación posteriores, tal como las realizan [SWS_CRYPT_50122] (ValidateCertificate) y [SWS_CRYPT_50123] (ValidateCertificateChain). Interpretación: Es probable que las respuestas OCSP deban añadirse antes del inicio de la validación de la ruta para que pueda tenerse en cuenta el estado de revocación de los certificados. Pregunta Q-fbb0711617fd7895 (abierta)
Este texto ha sido generado por una IA a partir de los datos de la especificación.
Guía del implementador pendiente (complejidad 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#4a78470a- Content hash
4a78470a- 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 · Original en alemán