Documentation ¶
Overview ¶
Package client provides an executable reference implementation of a simple client for the CONIKS key management system.
This test client is designed to communicate with the basic implementation of a CONIKS server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeyLookupMsg ¶
CreateKeyLookupMsg returns a JSON encoding of a protocol.KeyLookupRequest for the given name.
func CreateRegistrationMsg ¶
CreateRegistrationMsg returns a JSON encoding of a protocol.RegistrationRequest for the given (name, key) pair.
Types ¶
type Config ¶
type Config struct { SignPubkeyPath string `toml:"sign_pubkey_path"` SigningPubKey sign.PublicKey RegAddress string `toml:"registration_address,omitempty"` Address string `toml:"address"` ServerAddress *ServerAddress `toml:"server-address,omitempty"` }
Config contains the client's configuration needed to send a request to a CONIKS server: the path to the server's signing public-key file and the actual public-key parsed from that file; the server's addresses for sending registration requests and other types of requests, respectively.
Note that if RegAddress is empty, the client falls back to using Address for all request types.
func LoadConfig ¶
LoadConfig returns a client's configuration read from the given filename. It reads the signing public-key file and parses the actual key. If there is any parsing or IO-error it returns an error (and the returned config will be nil).
type ServerAddress ¶
type ServerAddress struct { // Address is formatted as : https://address:port Address string `toml:"address"` // TLSCertPath is a path to the server's TLS Certificate, // which has to be set if the connection is TCP. TLSCertPath string `toml:"cert"` // TLSKeyPath is a path to the server's TLS private key, // which has to be set if the connection is TCP. TLSKeyPath string `toml:"key"` }
A ServerAddress describes a ConiksClient server connection. The address must be specified explicitly. Additionally, HTTP connections must use TLS for added security, and each is required to specify a TLS certificate and corresponding private key.