Skip to main content

MockAuthenticationPlugin

Struct MockAuthenticationPlugin 

Source
pub struct MockAuthenticationPlugin { /* private fields */ }
Expand description

Mock-Implementation — akzeptiert alles, Handshake-Step-Count hard-coded.

Implementations§

Source§

impl MockAuthenticationPlugin

Source

pub fn new() -> Self

Konstruktor.

Trait Implementations§

Source§

impl AuthenticationPlugin for MockAuthenticationPlugin

Source§

fn validate_local_identity( &mut self, _props: &PropertyList, _participant_guid: [u8; 16], ) -> SecurityResult<IdentityHandle>

Wird einmal beim Participant-Start aufgerufen: lokale Identity validieren (Zertifikat, Key, Trust-Anchor) und einen Handle zurueckgeben. Read more
Source§

fn validate_remote_identity( &mut self, _local: IdentityHandle, _remote_participant_guid: [u8; 16], _remote_auth_token: &[u8], ) -> SecurityResult<IdentityHandle>

Wird aufgerufen, sobald via SPDP ein Remote-Participant entdeckt wurde. Plugin validiert das Remote-Cert (aus remote_auth_token) gegen seinen Trust-Store. Read more
Source§

fn begin_handshake_request( &mut self, _initiator: IdentityHandle, _replier: IdentityHandle, ) -> SecurityResult<(HandshakeHandle, HandshakeStepOutcome)>

Startet den Handshake. Liefert das erste Token, das an den Peer gesendet werden muss. Read more
Source§

fn begin_handshake_reply( &mut self, _replier: IdentityHandle, _initiator: IdentityHandle, request_token: &[u8], ) -> SecurityResult<(HandshakeHandle, HandshakeStepOutcome)>

Peer-Seite des Handshake-Starts. request_token ist was der Initiator per begin_handshake_request geschickt hat. Read more
Source§

fn process_handshake( &mut self, handshake: HandshakeHandle, token: &[u8], ) -> SecurityResult<HandshakeStepOutcome>

Folge-Nachrichten des Handshakes durchreichen. Read more
Source§

fn shared_secret( &self, handshake: HandshakeHandle, ) -> SecurityResult<SharedSecretHandle>

Beendet den Handshake und liefert den finalen SharedSecret. Fehlschlag bricht ab. Wird nach Complete-Outcome durch den Caller aufgerufen, um den Secret aus dem Plugin zu ziehen. Read more
Source§

fn plugin_class_id(&self) -> &str

Identity-Plugin-Name (z.B. “DDS:Auth:PKI-DH:1.2”). Wird in SPDP als dds.sec.auth.plugin_class annonciert.
Source§

fn get_identity_token(&self, _local: IdentityHandle) -> SecurityResult<Vec<u8>>

Liefert das IdentityToken fuer eine Local-Identity (Spec §9.3.2.4). Wird im SPDP-Announce als PID_IDENTITY_TOKEN (0x1001) publiziert. Default: leerer Token (= Plugin unterstuetzt das Feature nicht). Read more
Source§

fn get_identity_status_token( &self, _local: IdentityHandle, ) -> SecurityResult<Vec<u8>>

Liefert das IdentityStatusToken fuer eine Local-Identity (Spec §9.3.2.5.1.2). Default: leer. Read more
Source§

fn set_permissions_credential_and_token( &mut self, _local: IdentityHandle, _permissions_credential: &[u8], _permissions_token: &[u8], ) -> SecurityResult<()>

Setzt das Permissions-Credential und das Permissions-Token an einer Local-Identity (Spec §9.3.2.4 + §9.3.2.5.4). Wird vom Caller-Layer mit dem Output des AccessControlPlugin gespeist. Read more
Source§

fn get_authenticated_peer_credential_token( &self, _handshake: HandshakeHandle, ) -> SecurityResult<Vec<u8>>

Liefert das AuthenticatedPeerCredentialToken (Spec §9.3.2.5.6). Wird nach erfolgreichem Handshake vom AccessControl-Layer abgeholt, um den Caller-Subject-Match durchzufuehren. Default: leer. Read more
Source§

impl Debug for MockAuthenticationPlugin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MockAuthenticationPlugin

Source§

fn default() -> MockAuthenticationPlugin

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.