Documentation ¶
Overview ¶
Package tunneled1x provides a Config type for PEAP/TTLS protected network. Both PEAP and TTLS are tunneled protocols which use EAP inside of a TLS secured tunnel. The secured tunnel is a symmetric key encryption scheme negotiated under the protection of a public key in the server certificate. Thus, we'll see server credentials in the form of certificates, but client credentials in the form of passwords and a CA Cert to root the trust chain.
Index ¶
- Constants
- type Config
- type ConfigFactory
- type Option
- func AltSubjectMatch(sans []string) Option
- func ClientPassword(passwd string) Option
- func DomainSuffixMatch(domainSuffix []string) Option
- func FileSuffix(suffix string) Option
- func InnerProtocol(inner string) Option
- func Mode(mode wpa.ModeEnum) Option
- func OuterProtocol(outer string) Option
- func Phase2User(user, passwd, protocol string) Option
Constants ¶
const ( TTLSPrefix = "TTLS-" Layer1TypePEAP = "PEAP" Layer1TypeTTLS = "TTLS" Layer2TypeGTC = "GTC" Layer2TypeMSCHAPV2 = "MSCHAPV2" Layer2TypeMD5 = "MD5" Layer2TypeTTLSMSCHAPV2 = TTLSPrefix + "MSCHAPV2" Layer2TypeTTLSMSCHAP = TTLSPrefix + "MSCHAP" Layer2TypeTTLSPAP = TTLSPrefix + "PAP" )
Outer (layer1) and inner (layer2) protocols.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Embedded WPA-EAP Config to inherit the Install* and HostapdConfig methods. *wpaeap.Config // contains filtered or unexported fields }
Config implements security.Config interface for TTLS/PEAP protected network.
func (*Config) ShillServiceProperties ¶
ShillServiceProperties returns shill properties of TTLS/PEAP 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(serverCACert string, serverCred certificate.Credential, clientCACert, identity, serverPassword string, ops ...Option) *ConfigFactory
NewConfigFactory builds a ConfigFactory with the given Option.
type Option ¶
type Option func(*ConfigFactory)
Option is the function signature used to specify options of Config.
func AltSubjectMatch ¶
AltSubjectMatch returns an Option which sets shill EAP.SubjectAlternativeNameMatch property in Config.
func ClientPassword ¶
ClientPassword returns an Option which sets the client password in Config. Note that this is used for setting a bad password for testing, that is, it will be set to be the same as server's by default.
func DomainSuffixMatch ¶
DomainSuffixMatch returns an Option which sets shill EAP.DomainSuffixMatch property in Config.
func FileSuffix ¶
FileSuffix returns an Option which sets the file suffix in Config.
func InnerProtocol ¶
InnerProtocol returns an Option which sets the inner (layer2) protocol in Config.
func OuterProtocol ¶
OuterProtocol returns an Option which sets the outer (layer1) protocol in Config.
func Phase2User ¶
Phase2User returns an Option which adds additional phase 2 user in Config.