sign

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package sign codesigns files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(ctx context.Context, opts *Options) error

Sign signs one or more files returning an error if any.

Types

type Options

type Options struct {
	// Files are the list of files to sign. This is required. The files
	// will be signed _in-place_ so you must take care to copy the files
	// to a new location if you do not want these files modified.
	Files []string

	// Identity is the identity to use for the signing operation. This is required.
	// This value must be a valid value for the `-s` flag for the `codesign`
	// binary. See the man pages for that for more help since the value can
	// be in a variety of forms.
	Identity string

	// Entitlements is an (optional) path to a plist format .entitlements file
	Entitlements string

	// Output is an io.Writer where the output of the command will be written.
	// If this is nil then the output will only be sent to the log (if set)
	// or in the error result value if signing failed.
	Output io.Writer

	// Logger is the logger to use. If this is nil then no logging will be done.
	Logger hclog.Logger

	// BaseCmd is the base command for executing the codesign binary. This is
	// used for tests to overwrite where the codesign binary is.
	BaseCmd *exec.Cmd
}

Options are the options for Sign.

Jump to

Keyboard shortcuts

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