Documentation
¶
Index ¶
- Variables
- type Config
- type KeyConfig
- type KeypairMgrBackend
- func (b *KeypairMgrBackend) CheckFeatures() (asserts.ExtKeypairMgrSigning, error)
- func (b *KeypairMgrBackend) LoadByCanonicalFingerprint(fingerprint string) (*asserts.ExtKeypairMgrLoadedKey, error)
- func (b *KeypairMgrBackend) LoadByID(keyID string) (*asserts.ExtKeypairMgrLoadedKey, error)
- func (b *KeypairMgrBackend) RSAPKCSSign(keyHandle string, prepared []byte) ([]byte, error)
- func (b *KeypairMgrBackend) Sign(keyHandle string, content []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found")
ErrKeyNotFound is returned by LoadByID, LoadByCanonicalFingerprint and Sign when no configured key matches the requested id or handle.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
BaseURL string
ClientPrivateKey string
Keys []KeyConfig
// HTTPClient is the HTTP client used to talk to lp-signing. If nil,
// a client with a 30 second timeout is used.
HTTPClient *http.Client
}
Config describes how to connect to the Launchpad signing service.
type KeyConfig ¶
type KeyConfig struct {
AccountKey *asserts.AccountKey
Fingerprint string
}
KeyConfig maps one account-key assertion to the Launchpad fingerprint used for signing.
type KeypairMgrBackend ¶
type KeypairMgrBackend struct {
// contains filtered or unexported fields
}
KeypairMgrBackend is a sign-only asserts external keypair manager backend backed by lp-signing.
func NewKeypairMgrBackend ¶
func NewKeypairMgrBackend(cfg Config) (*KeypairMgrBackend, error)
NewKeypairMgrBackend creates a sign-only lp-signing backend from constructor-supplied configuration.
func (*KeypairMgrBackend) CheckFeatures ¶
func (b *KeypairMgrBackend) CheckFeatures() (asserts.ExtKeypairMgrSigning, error)
func (*KeypairMgrBackend) LoadByCanonicalFingerprint ¶
func (b *KeypairMgrBackend) LoadByCanonicalFingerprint(fingerprint string) (*asserts.ExtKeypairMgrLoadedKey, error)
LoadByCanonicalFingerprint loads a configured key by its canonical fingerprint.
func (*KeypairMgrBackend) LoadByID ¶
func (b *KeypairMgrBackend) LoadByID(keyID string) (*asserts.ExtKeypairMgrLoadedKey, error)
func (*KeypairMgrBackend) RSAPKCSSign ¶
func (b *KeypairMgrBackend) RSAPKCSSign(keyHandle string, prepared []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.