signtool

package
v0.0.0-...-c7fba9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package signtool offers tooling to sign assertions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(opts *Options, keypairMgr asserts.KeypairManager) ([]byte, error)

Sign produces the text of a signed assertion as specified by opts.

Types

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL