functie 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.
Gebruik
De methode AddOcspResponse van de klasse ara::crypto::x509::CertificateValidationCtx valideert een doorgegeven OCSP-respons (ocspResponse) en voegt deze bij geldigheid toe aan de verzameling reeds opgeslagen OCSP-responsen in de validatiecontext [SWS_CRYPT_50124]. Aan een context kunnen meerdere responsen worden toegevoegd [SWS_CRYPT_50124]. Via de optionele parameter trustedOcspIssuerCertificate kan een specifiek certificaat worden doorgegeven dat bij de controle van de OCSP-respons als betrouwbaar geldt; wordt deze parameter weggelaten, dan gebruikt de validatie de eerder via AddTrustedCertificate geconfigureerde certificaten [SWS_CRYPT_50124].
De synchrone aanroep levert een ara::core::Result<CertificateValidationStatus> op, die bij succesvolle overname de status kValid bevat of anders het resultaat van de OCSP-validatie dan wel een fout weergeeft [SWS_CRYPT_50124].
Foutafhandeling
De specificatie definieert geen gestandaardiseerde foutcodes voor deze aanroep [SWS_CRYPT_50124]. Faalt de bewerking, dan wordt ofwel de overeenkomstige validatiestatus in het resultaat overgebracht of een implementatiespecifieke fout via het Result-object gesignaleerd [SWS_CRYPT_50124].
Gelijktijdigheid en beperkingen
De bewerking is gespecificeerd als thread-safe en exception-safe [SWS_CRYPT_50124]. Om de validatie van de OCSP-respons te laten slagen, moet aan een van de volgende voorwaarden worden voldaan [SWS_CRYPT_50124]:
- De uitgever is eerder in de context als betrouwbaar of onbetrouwbaar certificaat opgeslagen [SWS_CRYPT_50124].
- De handtekening is afkomstig van een certificaat met gezette extensie
id-kp-OCSPSigningvan dezelfde certificeringsinstantie (CA) [SWS_CRYPT_50124]. - De handtekening is afkomstig van een betrouwbare CA die direct via
trustedOcspIssuerCertificateis doorgegeven [SWS_CRYPT_50124].
Samenspel
De geregistreerde OCSP-responsen worden meegenomen in daaropvolgende validatiecontroles, zoals uitgevoerd door [SWS_CRYPT_50122] (ValidateCertificate) en [SWS_CRYPT_50123] (ValidateCertificateChain). Interpretatie: De OCSP-responsen moeten vermoedelijk vóór de start van de padvalidatie worden toegevoegd, zodat rekening kan worden gehouden met de intrekkingsstatus van de certificaten. Vraag Q-fbb0711617fd7895 (open)
Deze tekst is gegenereerd door een AI op basis van de specificatiegegevens.
Implementer's Guide volgt (complexiteit 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#ff995a60- Content hash
ff995a60- 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 · Duits origineel