pub enum EpskcRequest {
StartEphemeralKey {
lifetime: u32,
responder: EpskcStartEphemeralKeyResponder,
},
StopEphemeralKey {
retain_active_session: bool,
responder: EpskcStopEphemeralKeyResponder,
},
#[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_session
is true and there is an active session.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: EpskcControlHandle
method_type: MethodType
Implementations§
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)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL