Documentation
¶
Overview ¶
Package signtool offers tooling to sign assertions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Stdout = os.Stdout
)
Functions ¶
func GenerateKey ¶
func GenerateKey(keypairMgr KeypairManager, keyName string) error
GenerateKey generates a private RSA key using the provided keypairMgr.
Types ¶
type KeypairManager ¶
type KeypairManager interface {
asserts.KeypairManager
GetByName(keyNname string) (asserts.PrivateKey, error)
Export(keyName string) ([]byte, error)
List() ([]asserts.ExternalKeyInfo, error)
DeleteByName(keyName string) error
}
KeypairManager is an interface for common methods of ExternalKeypairManager and GPGPKeypairManager.
func GetKeypairManager ¶
func GetKeypairManager() (KeypairManager, error)
GetKeypairManager returns a KeypairManager - either the standrd gpg-based or external one if set via SNAPD_EXT_KEYMGR environment variable.
type Options ¶
type Options struct {
// KeyID specifies the key id of the key to use
KeyID string
// Statement is used as input to construct the assertion
// it's a mapping encoded as JSON
// of the header fields of the assertion
// plus an optional pseudo-header "body" to specify
// the body of the assertion
Statement []byte
// Complement specifies complementary headers to what is in
// Statement, for use by tools that fill-in/compute some of
// the headers. Headers appearing both in Statement and
// Complement are an error, except for "type" that needs
// instead to match if present. Pseudo-header "body" can also
// be specified here.
Complement map[string]interface{}
}
Options specifies the complete input for signing an assertion.
Click to show internal directories.
Click to hide internal directories.