security

package
v0.0.0-...-9474aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package security defines interfaces for test authors to deal with the diverse WiFi security standards:

  • Interface Config defines methods to compose configuration files of AP or DUT.
  • Interface ConfigFactory lets the authors to register the security options in testing.AddTest and Gen the Config object later in test body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	// Class returns the SecurityClass (defined in shill/service.go) of the WiFi service
	// which is used for searching for WiFi service.
	Class() string
	// HostapdConfig returns the hostapd config of the WiFi service.
	// Note that InstallRouterCredentials() may update the router config so that it should be
	// called before HostapdConfig(). Also, the implementation shall perform validity check.
	HostapdConfig() (map[string]string, error)
	// ShillServiceProperties returns the shill properties that the DUT should set in
	// order to connect to the WiFi service configured by HostapdConfig.
	// Note that InstallClientCredentials() may update the client config so that it should be
	// called before ShillServiceProperties(). Also, the implementation shall perform validity check.
	ShillServiceProperties() (map[string]interface{}, error)
	// NeedsNetCertStore tells if the security config needs a NetCertStore.
	NeedsNetCertStore() bool
	// InstallRouterCredentials installs the necessary credentials onto router.
	InstallRouterCredentials(ctx context.Context, host *ssh.Conn, workDir string) error
	// InstallClientCredentials installs the necessary credentials onto DUT.
	InstallClientCredentials(context.Context, *netcertstore.Store) error
}

Config defines methods to generate hostapd and shill config of protected network.

type ConfigFactory

type ConfigFactory interface {
	Gen() (Config, error)
}

ConfigFactory defines a Gen() method to generate a Config instance. A security protocol should implement its own ConfigFactory interface as well as a NewConfigFactory() function to compose a declarative factory object for generating a security config. A factory, once created via NewConfigFactory, holds a list of options provided in testing.AddTest. Gen() then uses the stored options to compose a Config. Noted that the creation of a ConfigFactory object must not emit an error to satisfy the requirement of declarative test registration.

Directories

Path Synopsis
Package base provides a Config type for open network.
Package base provides a Config type for open network.
Package dynamicwep provides a Config type for Dynamic WEP protected network.
Package dynamicwep provides a Config type for Dynamic WEP protected network.
Package eap is an abstract class for EAP security classes which need certificate/key installation.
Package eap is an abstract class for EAP security classes which need certificate/key installation.
Package tunneled1x provides a Config type for PEAP/TTLS protected network.
Package tunneled1x provides a Config type for PEAP/TTLS protected network.
Package wep provides a Config type for WEP protected network.
Package wep provides a Config type for WEP protected network.
Package wpa provides a Config type for WPA protected network.
Package wpa provides a Config type for WPA protected network.
Package wpaeap provides a Config type for WPA EAP protected network.
Package wpaeap provides a Config type for WPA EAP protected network.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL