pub enum EpskcRequest {
StartEphemeralKey {
lifetime: u32,
responder: EpskcStartEphemeralKeyResponder,
},
StopEphemeralKey {
retain_active_session: bool,
responder: EpskcStopEphemeralKeyResponder,
},
WatchEphemeralKeyState {
responder: EpskcWatchEphemeralKeyStateResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: EpskcControlHandle,
method_type: MethodType,
},
}Expand description
ePSKc configuration protocol
This allows callers to interact with the Thread stack’s ePSKc functionality to produce or invalidate ephemeral keys.
Variants§
StartEphemeralKey
Starts the ephemeral key handler.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
The lifetime is in units of milliseconds.
From OpenThread:
When successfully set, the ephemeral key can be used only once by an external commissioner candidate to establish a secure session. After the commissioner candidate disconnects, the use of the ephemeral key is stopped.
The maximum ephemeral key lifetime is 10 minutes.
If a lifetime of 0 is provided, OpenThread will use its default lifetime of 2 minutes.
If the lifetime expires, the use of the ephemeral key is stopped, and any connected session using the key is immediately disconnected.
The Ephemeral Key Manager limits the number of failed DTLS connections to 10 attempts. After the 10th failed attempt, the use of the ephemeral key is automatically stopped (even if the lifetime has not yet expired).
ZX_ERR_INVALID_ARGS: The specified lifetime is greater than allowed.ZX_ERR_BAD_STATE: The ePSKc functionality has not been enabled.ZX_ERR_INTERNAL: There was a failure in generating the ephemeral key.`
StopEphemeralKey
Stops the ephemeral key use.
Existing sessions are terminated if retain_active_session is false. If retain_active_session is true and there is an ongoing session, the ephemeral key is not stopped.
The ePSKc functionality must first be enabled via fuchsia.lowpan.thread/FeatureConnector.
ZX_ERR_BAD_STATE: The ePSKc functionality has not been enabled orretain_active_sessionis true and there is an active session.
WatchEphemeralKeyState
Observes changes to the operational state of the Ephemeral Key Manager.
The first call returns the current EphemeralKeyState immediately.
Subsequent calls block until the state differs from the value last
returned on this channel. Intermediate states are not queued: if the
state changes several times between calls, only the latest state is
returned, and a change that reverts to the last-returned value may not
be observed at all.
When ePSKc is disabled via fuchsia.lowpan.thread/FeatureConnector,
the state is reported as DISABLED.
Having more than one concurrent call to this method on the same channel
is an error and will cause the channel to be closed with a
ZX_ERR_BAD_STATE epitaph.
Fields
responder: EpskcWatchEphemeralKeyStateResponder#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: EpskcControlHandlemethod_type: MethodTypeImplementations§
Source§impl EpskcRequest
impl EpskcRequest
pub fn into_start_ephemeral_key( self, ) -> Option<(u32, EpskcStartEphemeralKeyResponder)>
pub fn into_stop_ephemeral_key( self, ) -> Option<(bool, EpskcStopEphemeralKeyResponder)>
pub fn into_watch_ephemeral_key_state( self, ) -> Option<EpskcWatchEphemeralKeyStateResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL