signing

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: GPL-3.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package signing verifies detached signatures made with the project's signing keys. A signature file holds one signature per line, an algorithm name and a base64 signature separated by a space; data is trusted when any line is a valid signature by a trusted key. The update manifest and the artwork index use it.

Index

Constants

View Source
const (
	// MaxSignatureSize is the largest signature file accepted.
	MaxSignatureSize = 4 * 1024

	// MaxSignatureLines is the most lines a signature file may have.
	MaxSignatureLines = 16
)

Variables

This section is empty.

Functions

func Verify

func Verify(data, sig []byte, keys Keys) bool

Verify reports whether any line of the signature file sig is a valid signature of data by one of keys. Lines with an unknown algorithm are skipped. A signature file over MaxSignatureSize or MaxSignatureLines is rejected.

Types

type Keys

type Keys struct {
	// contains filtered or unexported fields
}

Keys holds trusted signing public keys.

func ParseKeys

func ParseKeys(entries []string) (Keys, []error)

ParseKeys parses public keys of the form algorithm:base64. Entries with an unknown algorithm or a malformed key are skipped and reported in the returned errors.

func (Keys) Empty

func (k Keys) Empty() bool

Empty reports whether there are no usable keys.

Jump to

Keyboard shortcuts

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