Version: v0.0.0-...-30b4a77 Latest Latest

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

Go to latest
Published: Feb 28, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0



Package keylookup implements key lookup calls.



This section is empty.


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

ServiceURL is the default URL for the keylookup service


This section is empty.


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) GetKey

func (klc LookupClient) GetKey(keyid *[signkeys.KeyIDSize]byte) (*signkeys.PublicKey, error)

GetKey tries to lookup a key from the lookup service

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).

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL