Documentation
¶
Overview ¶
Package wpa provides a Config type for WPA protected network.
Index ¶
Constants ¶
const ( RawPSKLen = 64 MinPassphraseLen = 8 MaxPassphraseLen = 63 )
A PSK should be a string composed with 64 hex digits, or a ASCII passphrase whose length is between 8 and 63 (inclusive).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Embedded base config so we don't have to re-implement credential-related methods. base.Config // contains filtered or unexported fields }
Config implements security.Config interface for WPA protected network.
func (*Config) HostapdConfig ¶
HostapdConfig returns hostapd config of WPA network.
func (*Config) ShillServiceProperties ¶
ShillServiceProperties returns shill properties of WPA network.
type ConfigFactory ¶
type ConfigFactory struct {
// contains filtered or unexported fields
}
ConfigFactory holds some Option and provides Gen method to build a new Config.
func NewConfigFactory ¶
func NewConfigFactory(psk string, ops ...Option) *ConfigFactory
NewConfigFactory builds a ConfigFactory with the given Option.
type FTModeEnum ¶
type FTModeEnum int
FTModeEnum is the type for specifying WPA Fast Transition modes.
const ( FTModeNone FTModeEnum = 1 << iota FTModePure FTModeMixed = FTModeNone | FTModePure )
Fast Transition modes.
type ModeEnum ¶
type ModeEnum int
ModeEnum is the type for specifying WPA modes.
const ( ModePureWPA ModeEnum = 1 << iota ModePureWPA2 ModePureWPA3 ModeMixed = ModePureWPA | ModePureWPA2 ModeMixedWPA3 = ModePureWPA2 | ModePureWPA3 )
WPA modes.
type Option ¶
type Option func(*Config)
Option is the function signature used to specify options of Config.
func FTMode ¶
func FTMode(ft FTModeEnum) Option
FTMode returns an Option which sets fast transition mode in Config.
func GMKRekeyPeriod ¶
GMKRekeyPeriod returns an Option which sets time interval in seconds for rekeying GMK in Config.
func GTKRekeyPeriod ¶
GTKRekeyPeriod returns an Option which sets time interval in seconds for rekeying GTK in Config.
func PTKRekeyPeriod ¶
PTKRekeyPeriod returns an Option which sets maximum lifetime in seconds for PTK in Config.
func UseStrictRekey ¶
UseStrictRekey returns an Option which sets strict rekey in Config.