signatures

package
v0.0.0-...-8b2e275 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02T15:04:05Z"

Variables

This section is empty.

Functions

func Sign

func Sign(pathToPrivateKey string, signatureData *SignatureData) (string, error)

func Verify

func Verify(signature string, signatureData *SignatureData) (*x509.Certificate, error)

Verify ensures that a given signature was created by a private key matching one of the given instance certificates. It returns the matching certificate, which should further be verified to be the identity certificate, and to be issued by a chain leading to the root CA certificate. There's a util function for this named Validate.

Types

type SignatureData

type SignatureData struct {
	SigningTime time.Time
	Role        string

	// CFInstanceCertContents are the full contents/body of the file
	// available at CF_INSTANCE_CERT. When viewed visually, this file
	// will contain two certificates. Generally, the first one is the
	// identity certificate itself, and the second one is the intermediate
	// certificate that issued it.
	CFInstanceCertContents string
}

Jump to

Keyboard shortcuts

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