Documentation
¶
Overview ¶
Package eap is an abstract class for EAP security classes which need certificate/key installation.
Index ¶
- type Config
- func (c *Config) Class() string
- func (c *Config) HostapdConfig() (map[string]string, error)
- func (c *Config) InstallClientCredentials(ctx context.Context, store *netcertstore.Store) error
- func (c *Config) InstallRouterCredentials(ctx context.Context, host *ssh.Conn, workDir string) error
- func (c *Config) NeedsNetCertStore() bool
- func (c *Config) ShillServiceProperties() (map[string]interface{}, error)
- type ConfigFactory
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Fields that would be set in InstallRouterCredentials(). ServerCACertFile string ServerCertFile string ServerKeyFile string ServerEAPUsersFile string // Fields that would be set in InstallClientCredentials(). ClientSlotID int Pin string NetCertID string // contains filtered or unexported fields }
Config implements security.Config interface for EAP protected network.
func (*Config) HostapdConfig ¶
HostapdConfig returns hostapd config of EAP network.
func (*Config) InstallClientCredentials ¶
InstallClientCredentials installs credentials on the DUT.
func (*Config) InstallRouterCredentials ¶
func (c *Config) InstallRouterCredentials(ctx context.Context, host *ssh.Conn, workDir string) error
InstallRouterCredentials installs the necessary credentials onto router.
func (*Config) NeedsNetCertStore ¶
NeedsNetCertStore tells that netcert store is necessary for this test.
func (*Config) ShillServiceProperties ¶
ShillServiceProperties returns shill properties of EAP 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, ops ...Option) *ConfigFactory
NewConfigFactory builds a ConfigFactory with the given Option.
type Option ¶
type Option func(*Config)
Option is the function signature used to specify options of Config.
func ClientCACert ¶
ClientCACert returns an Option which sets the PEM encoded CA certificate for client in Config.
func ClientCred ¶
func ClientCred(cred certificate.Credential) Option
ClientCred returns an Option which sets the PEM encoded credentials for client in Config.
func FileSuffix ¶
FileSuffix returns an Option which sets the file suffix in Config.
func ServerEAPUsers ¶
ServerEAPUsers returns an Option which sets the EAP users for server in Config.