Documentation ¶
Overview ¶
Package config implements the configuration for the Katzenpost client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeys ¶
GenerateKeys makes the key dir and then generates the keys and saves them into pem files
func LoadLinkKey ¶
func LoadLinkKey(basePath string) (*ecdh.PrivateKey, error)
LoadLinkKey can load or generate the keys
Types ¶
type Account ¶
type Account struct { // User is the account user name. User string // Provider is the provider identifier used by this account. Provider string // ProviderKeyPin is the optional pinned provider signing key. ProviderKeyPin *eddsa.PublicKey }
Account is a provider account configuration.
type Config ¶
type Config struct { Proxy *Proxy Logging *Logging Debug *Debug NonvotingAuthority *NonvotingAuthority VotingAuthority *VotingAuthority Account *Account }
Config is the top level client configuration.
func Load ¶
Load parses and validates the provided buffer b as a config file body and returns the Config.
func (*Config) FixupAndValidate ¶
FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.
type Debug ¶
type Debug struct { // TargetProvider is the target service provider for our probes. TargetProvider string // TargetRecipient is the target recipient for our probes. TargetRecipient string // SendBurst controls the burst rate of the egress rate limiter. SendBurst int // SendRate controls the egress rate limiter and is packets per second. SendRate float64 // SessionDialTimeout is the number of seconds that a session dial // is allowed to take until it is cancelled. SessionDialTimeout int // InitialMaxPKIRetrievalDelay is the initial maximum number of seconds // we are willing to wait for the retreival of the PKI document. InitialMaxPKIRetrievalDelay int // CaseSensitiveUserIdentifiers disables the forced lower casing of // the Account `User` field. CaseSensitiveUserIdentifiers bool // GenerateOnly halts and cleans up right after long term // key generation. GenerateOnly bool // PollingInterval is the interval in seconds that will be used to // poll the receive queue. By default this is 30 seconds. Reducing // the value too far WILL result in uneccesary Provider load, and // increasing the value too far WILL adversely affect large message // transmit performance. PollingInterval int }
Debug is the debug configuration.
type Logging ¶
type Logging struct { // Disable disables logging entirely. Disable bool // File specifies the log file, if omitted stdout will be used. File string // Level specifies the log level. Level string }
Logging is the logging configuration.
type NonvotingAuthority ¶
type NonvotingAuthority struct { // Address is the IP address/port combination of the authority. Address string // PublicKey is the authority's public key. PublicKey *eddsa.PublicKey }
NonvotingAuthority is a non-voting authority configuration.
type Proxy ¶
type Proxy struct { // DataDir is the absolute path to the data directory. DataDir string }
Proxy is the proxy configuration.
type VotingAuthority ¶
type VotingAuthority struct {
Peers []*vServerConfig.AuthorityPeer
}
VotingAuthority is a voting authority configuration.