Struct wlan_rsn::Authenticator
source · pub struct Authenticator {
pub auth_cfg: Config,
/* private fields */
}
Fields§
§auth_cfg: Config
Implementations§
source§impl Authenticator
impl Authenticator
sourcepub fn new_wpa2psk_ccmp128(
nonce_rdr: Arc<NonceReader>,
gtk_provider: Arc<Mutex<GtkProvider>>,
psk: Psk,
s_addr: MacAddr,
s_protection: ProtectionInfo,
a_addr: MacAddr,
a_protection: ProtectionInfo,
) -> Result<Authenticator, Error>
pub fn new_wpa2psk_ccmp128( nonce_rdr: Arc<NonceReader>, gtk_provider: Arc<Mutex<GtkProvider>>, psk: Psk, s_addr: MacAddr, s_protection: ProtectionInfo, a_addr: MacAddr, a_protection: ProtectionInfo, ) -> Result<Authenticator, Error>
WPA2-PSK CCMP-128 Authenticator which supports 4-Way Handshake. The Authenticator does not support GTK rotations.
sourcepub fn new_wpa3(
nonce_rdr: Arc<NonceReader>,
gtk_provider: Arc<Mutex<GtkProvider>>,
igtk_provider: Arc<Mutex<IgtkProvider>>,
ssid: Ssid,
password: Vec<u8>,
s_addr: MacAddr,
s_protection: ProtectionInfo,
a_addr: MacAddr,
a_protection: ProtectionInfo,
) -> Result<Authenticator, Error>
pub fn new_wpa3( nonce_rdr: Arc<NonceReader>, gtk_provider: Arc<Mutex<GtkProvider>>, igtk_provider: Arc<Mutex<IgtkProvider>>, ssid: Ssid, password: Vec<u8>, s_addr: MacAddr, s_protection: ProtectionInfo, a_addr: MacAddr, a_protection: ProtectionInfo, ) -> Result<Authenticator, Error>
WPA3 Authenticator which supports 4-Way Handshake. The Authenticator does not support GTK rotations.
pub fn get_negotiated_protection(&self) -> &NegotiatedProtection
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets all established Security Associations and invalidates all derived keys in this ESSSA. The Authenticator must be reset or destroyed when the underlying 802.11 association terminates. The replay counter is also reset.
sourcepub fn initiate(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>
pub fn initiate(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>
initiate(...)
must be called when the Authenticator should start establishing a
security association with a client.
The Authenticator must always initiate the security association in the current system as
EAPOL request frames from clients are not yet supported.
This method can be called multiple times to re-initiate the security association, however,
calling this method will invalidate all established security associations and their derived
keys.
sourcepub fn on_eapol_frame<B: SplitByteSlice>(
&mut self,
update_sink: &mut UpdateSink,
frame: Frame<B>,
) -> Result<(), Error>
pub fn on_eapol_frame<B: SplitByteSlice>( &mut self, update_sink: &mut UpdateSink, frame: Frame<B>, ) -> Result<(), Error>
Entry point for all incoming EAPOL frames. Incoming frames can be corrupted, invalid or of
unsupported types; the Authenticator will filter and drop all unexpected frames.
Outbound EAPOL frames, status and key updates will be pushed into the update_sink
.
The method will return an Error
if the frame was invalid.