Documentation ¶
Overview ¶
Package keylookup implements key lookup calls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadSigner is returned if a verification pubkey list was signed by the wrong signer ErrBadSigner = errors.New("keylookup: bad signer") // ErrParams is returned if a call returned bad parameters ErrParams = errors.New("keylookup: bad RPC parameters") // ErrBadSignature signals that a packet signature did not verify ErrBadSignature = errors.New("keylookup: bad signature") )
View Source
var DefaultClientFactory = jsonclient.New
DefaultClientFactory is the default factory for new clients
View Source
var ServiceURL = constants.KeyLookupURL
ServiceURL is the default URL for the keylookup service
Functions ¶
This section is empty.
Types ¶
type LookupClient ¶
type LookupClient struct { KeyPool *keypool.KeyPool ClientFactory func(string, []byte) (*jsonclient.URLClient, error) ServiceGuardCA []byte // The CA of the serviceguard, if any PubKey *[ed25519.PublicKeySize]byte }
LookupClient implements a key lookup client
func New ¶
func New(keyPool *keypool.KeyPool, cacert []byte, pubKey *[ed25519.PublicKeySize]byte) *LookupClient
New returns a new key lookup client
func (LookupClient) GetVerifyList ¶
func (klc LookupClient) GetVerifyList() ([][ed25519.PublicKeySize]byte, error)
GetVerifyList requests a list of known issuer keys from the lookup service
func (*LookupClient) RegisterStorage ¶
func (klc *LookupClient) RegisterStorage()
RegisterStorage adds the lookup client to the keypool storage to accomplish automatic fetches. This should be used with great care since it locks the keypool during fetch (which can be many minutes).
Click to show internal directories.
Click to hide internal directories.