फ़ंक्शन 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.
उपयोग
क्लास ara::crypto::x509::CertificateValidationCtx की विधि AddOcspResponse पास की गई OCSP प्रतिक्रिया (ocspResponse) को मान्य करती है और मान्य होने पर इसे सत्यापन संदर्भ में पहले से संग्रहीत OCSP प्रतिक्रियाओं के सेट में जोड़ती है [SWS_CRYPT_50124]। एक संदर्भ में एकाधिक प्रतिक्रियाएँ जोड़ी जा सकती हैं [SWS_CRYPT_50124]। वैकल्पिक पैरामीटर trustedOcspIssuerCertificate के माध्यम से एक विशिष्ट प्रमाणपत्र पास किया जा सकता है जिसे OCSP प्रतिक्रिया के सत्यापन में विश्वसनीय माना जाता है; यदि इस पैरामीटर को छोड़ दिया जाता है, तो सत्यापन पहले AddTrustedCertificate के माध्यम से कॉन्फ़िगर किए गए प्रमाणपत्रों का उपयोग करता है [SWS_CRYPT_50124]।
सिंक्रोनस कॉल एक ara::core::Result<CertificateValidationStatus> लौटाता है, जिसमें सफल स्वीकृति पर स्थिति kValid होती है या अन्यथा OCSP सत्यापन का परिणाम अथवा कोई त्रुटि प्रदर्शित होती है [SWS_CRYPT_50124]।
त्रुटि प्रबंधन
विनिर्देश इस कॉल के लिए किसी मानकीकृत त्रुटि कोड को परिभाषित नहीं करता है [SWS_CRYPT_50124]। यदि ऑपरेशन विफल रहता है, तो या तो परिणाम में संगत सत्यापन स्थिति ले जाई जाती है या Result ऑब्जेक्ट के माध्यम से एक कार्यान्वयन-विशिष्ट त्रुटि का संकेत दिया जाता है [SWS_CRYPT_50124]।
समवर्तीता और प्रतिबंध
ऑपरेशन को थ्रेड-सुरक्षित (thread-safe) और अपवाद-सुरक्षित (exception-safe) के रूप में निर्दिष्ट किया गया है [SWS_CRYPT_50124]। OCSP प्रतिक्रिया का सत्यापन सफल होने के लिए, निम्नलिखित शर्तों में से एक पूरी होनी चाहिए [SWS_CRYPT_50124]:
- जारीकर्ता को पहले संदर्भ में एक विश्वसनीय या गैर-विश्वसनीय प्रमाणपत्र के रूप में संग्रहीत किया गया हो [SWS_CRYPT_50124]।
- हस्ताक्षर उसी प्रमाणपत्र प्राधिकरण (CA) के
id-kp-OCSPSigningएक्सटेंशन सेट वाले प्रमाणपत्र से आता हो [SWS_CRYPT_50124]। - हस्ताक्षर किसी विश्वसनीय CA से आता हो जिसे सीधे
trustedOcspIssuerCertificateके माध्यम से पास किया गया था [SWS_CRYPT_50124]।
इंटरैक्शन
पंजीकृत OCSP प्रतिक्रियाएँ परवर्ती सत्यापन जांचों में शामिल होती हैं, जैसा कि [SWS_CRYPT_50122] (ValidateCertificate) और [SWS_CRYPT_50123] (ValidateCertificateChain) द्वारा किया जाता है। व्याख्या: प्रमाणपत्रों की निरस्तीकरण स्थिति (revocation status) को ध्यान में रखने के लिए OCSP प्रतिक्रियाओं को पथ सत्यापन शुरू होने से पहले जोड़ा जाना आवश्यक हो सकता है। प्रश्न Q-fbb0711617fd7895 (खुला)
यह पाठ विनिर्देश डेटा के आधार पर एक AI द्वारा उत्पन्न किया गया था।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता 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#c7880bd9- Content hash
c7880bd9- 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 · जर्मन मूल