Documentation
¶
Overview ¶
Package signing signs and verifies PE, Mach-O, and ELF binaries.
Index ¶
Constants ¶
const ( TrustSystem = "system trusted" TrustSelfSigned = "self-signed" TrustUntrusted = "untrusted" )
Certificate trust levels reported in Verification.Trust.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Path string
SigningKey string
SigningChains []string
Passphrase string
UserAgent string
}
Options describes a binary signing operation.
type Verification ¶
type Verification struct {
Chain []*x509.Certificate
Trust []string
Timestamp time.Time
TimestampAuthority *x509.Certificate
}
Verification describes a verified binary signature. Trust holds, for each certificate in Chain, its trust level: "system trusted", "self-signed" or "untrusted".
func Verify ¶
func Verify(options VerifyOptions) (*Verification, error)
Verify detects the binary format and verifies the file signature. When a certificate is supplied, the signing certificate must match it; otherwise the signature is verified against the system trust store alone. It returns the verified certificate chain, ordered from the signing certificate to the trust anchor, along with the timestamp authority.
type VerifyOptions ¶
VerifyOptions describes a binary signature verification operation.