DEENESPTFRRUARHIKOZHNL

class ara::crypto::x509::X509DN

[SWS_CRYPT_40400] Upstream: RS_CRYPTO_02306

class X509DN : public ara::crypto::Serializable {...};

Interface of X.509 Distinguished Name (DN).

Header-Datei#include "ara/crypto/x509/x509_dn.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::x509
Basisklasse(n)ara::crypto::Serializable

User GuideAI-GENERATED

Encapsulates an X.509 Distinguished Name and outputs it formatted as an RFC 4514 string.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d02e57b4256c Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Encapsulates an X.509 Distinguished Name and outputs it formatted as an RFC 4514 string.

The interface ara::crypto::x509::X509DN serves to encapsulate and provide an X.509 Distinguished Name as a serializable data structure within the crypto module. Shared, immutable ownership of instances is realized as std::shared_ptr<const X509DN> via the alias Sptrc [SWS_CRYPT_40401]. The central method ToString() formats the full name according to RFC 4514 and operates thread-safe and without standardized error codes [SWS_CRYPT_40411]. Callers receive the result as ara::core::Result<ara::core::String>, which must be checked for validity prior to further processing.

Context

Within the module crypto of the AUTOSAR Adaptive Platform, the abstract interface ara::crypto::x509::X509DN represents a Distinguished Name (DN) according to the X.509 standard. Through inheritance from ara::crypto::Serializable, the class is embedded into the type hierarchy as a serializable cryptographic data structure. The primary task of the interface is to encapsulate name structures of certificates, certificate subjects, or certificate issuers on the software side. A central role is played by providing a standardized text representation: according to [SWS_CRYPT_40411], the method ToString() exports the complete Distinguished Name as a string in accordance with the RFC 4514 specification. If the underlying Distinguished Name contains non-standardized attributes, the respective Object Identifier (OID) is used for these attributes [SWS_CRYPT_40411].

Lifecycle

Because ara::crypto::x509::X509DN is an abstract C++ interface with pure virtual methods like ToString(), instantiation is not performed directly by application developers. The payload specifies no public constructor; concrete instances are presumably created by higher-level components or certificate parsers of the cryptographic subsystem. Question Q-108d7589869c7370 (open)

For shared and long-lived access, the interface defines the type specifier Sptrc as an alias for std::shared_ptr<const X509DN> [SWS_CRYPT_40401]. The use of a constant shared pointer emphasizes the ownership and access concept: instances of X509DN are externally immutable. Multiple consumers can safely and statelessly share the same representation of a Distinguished Name without incurring synchronization overhead during read accesses. With respect to concurrency, the central method ToString() is explicitly declared as thread-safe [SWS_CRYPT_40411]. Concurrent invocations via the same shared pointer or across different threads are thus permissible without external locks. In addition, the specification guarantees full exception safety (exception safe) for this call [SWS_CRYPT_40411].

Usage Path

The typical usage path focuses on reading and further processing the formatted Distinguished Name for logging, authentication, or identity verification. An application typically receives a pointer of type ara::crypto::x509::X509DN::Sptrc [SWS_CRYPT_40401].

On this instance, the caller executes the method ToString() [SWS_CRYPT_40411]. The call is made noexcept and returns a ara::core::Result<ara::core::String> [SWS_CRYPT_40411]. Upon successful evaluation, the Result object contains the string formatted according to RFC 4514, for example in the standardized form of attribute-value pairs such as CN=... or using OIDs for proprietary attributes [SWS_CRYPT_40411]. The application can subsequently extract the resulting string and use it for application-specific checks, comparisons, or audit logs.

Error Scenarios

When interacting with ara::crypto::x509::X509DN, error handling is characterized by a clear, minimal design. Although ToString() uses the return type ara::core::Result<ara::core::String>, the specification explicitly stipulates that the function defines no standardized error codes [SWS_CRYPT_40411]. This means that in the regular specification context, no functional rejection reasons or validation errors are specified for the serialization process.

Because the function is also specified as noexcept and exception safe [SWS_CRYPT_40411], synchronous C++ exceptions are ruled out. If error states nevertheless occur within the returned ara::core::Result, they are presumably attributable to platform- or implementation-specific causes such as memory bottlenecks during allocation of the result string. Question Q-10477dd7d77e3b78 (open) Callers must therefore always verify whether the Result contains a valid value or an error before unwrapping the value, even though AUTOSAR defines no domain-specific error constants for this.

This guide is based on the AUTOSAR specification for the Adaptive Platform (Release R25-11, module crypto) and was generated automatically.

UML class diagram

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

G nara__crypto__x509__X509DN930 X509DN + ToString() nara__crypto__Serializable855 Serializable nara__crypto__x509__X509DN930->nara__crypto__Serializable855

Methods

ToString function

Get the whole Distinguished Name (DN) as a single string according to RFC 4514. If the DN contains unstandardized attributes, the attribute’s OID is used.

virtual ara::core::Result< ara::core::String > ToString () const noexcept=0;

Type aliases

Sptrc type alias

Const shared smart pointer of the interface.

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

Method documentation

function ToString [SWS_CRYPT_40411] Upstream: RS_CRYPTO_02306

virtual ara::core::Result< ara::core::String > ToString () const noexcept=0;

Get the whole Distinguished Name (DN) as a single string according to RFC 4514. If the DN contains unstandardized attributes, the attribute’s OID is used.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: d8ee80e25da6 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The pure virtual method ToString of interface ara::crypto::x509::X509DN exports the complete Distinguished Name (DN) as a single formatted string according to RFC 4514 [SWS_CRYPT_40411]. Should the DN comprise non-standardized attributes, their Object Identifier (OID) is used in the string instead of a name for these attributes [SWS_CRYPT_40411]. For usage, header ara/crypto/x509/x509_dn.h must be included [SWS_CRYPT_40411].

The call is executed synchronously and without parameters on a const instance. The return type used is ara::core::Result<ara::core::String>, which provides the complete string representation of the Distinguished Name in case of success [SWS_CRYPT_40411]. Specific or standardized error codes are not defined for this function in the specification [SWS_CRYPT_40411].

For use in concurrent operation, ToString is classified as thread-safe [SWS_CRYPT_40411]. Furthermore, exception safety applies, supported by the noexcept specification of the function signature, which precludes the occurrence of C++ exceptions [SWS_CRYPT_40411].

This usage note was created automatically based on the AUTOSAR specification.

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

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::String >String of the whole DN string

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_40411
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_40411@rel:R25-11#0a4f449c
Content hash
0a4f449c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_40411
Status: valid/unmigrated Version: rel:R25-11#027bb18b 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_40411@rel:R25-11#027bb18b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0a4f449c2026-09-30
  • R19-11rel:R19-11#aa7783f22026-10-14
  • R20-11rel:R20-11#107617f62026-10-14
  • R21-11rel:R21-11#ffe162c32026-10-14
  • R22-11rel:R22-11#c6c8fcc72026-10-14
  • R23-11rel:R23-11#8b07ee3d2026-10-14
  • R24-11rel:R24-11#d26b8a3b2026-10-14
  • R25-11rel:R25-11#027bb18b2026-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

Type alias documentation

type alias Sptrc [SWS_CRYPT_40401] Upstream: RS_CRYPTO_02306

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

Const shared smart pointer of the interface.

Header-Datei#include "ara/crypto/x509/x509_dn.h"
Scopeclass ara::crypto::x509::X509DN
SymbolSptrc

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

Record
AUTOSAR/AP/record/SWS_CRYPT_40401
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_40401@rel:R25-11#0b636ab7
Content hash
0b636ab7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_40401
Status: valid/unmigrated Version: rel:R25-11#a001dc44 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_40401@rel:R25-11#a001dc44
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0b636ab72026-09-30
  • R19-11rel:R19-11#ced209c92026-10-14
  • R20-11rel:R20-11#202479662026-10-14
  • R21-11rel:R21-11#202479662026-10-14
  • R22-11rel:R22-11#c65923232026-10-14
  • R23-11rel:R23-11#7df124232026-10-14
  • R24-11rel:R24-11#7df124232026-10-14
  • R25-11rel:R25-11#a001dc442026-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