appmanifest

package
v7.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NsMsRel        = "http://schemas.microsoft.com/windows/rel/2005/reldata"
	NsMpeg21       = "urn:mpeg:mpeg21:2003:01-REL-R-NS"
	NsAuthenticode = "http://schemas.microsoft.com/windows/pki/2005/Authenticode"
)

Variables

This section is empty.

Functions

func PublicKeyToSnk

func PublicKeyToSnk(pubKey crypto.PublicKey) ([]byte, error)

Convert public key to "snk" format

func PublicKeyToken

func PublicKeyToken(pubKey crypto.PublicKey) (string, error)

Calculate the publicKeyToken from a public key. This involves mangling it into a .snk file format, then hashing it.

http://www.developerfusion.com/article/84422/the-key-to-strong-names/

func PublisherIdentity

func PublisherIdentity(cert *certloader.Certificate) (string, string, error)

func VerifyTimestamp

func VerifyTimestamp(timestamp *pkcs7.ContentInfoSignedData, encryptedDigest []byte, extraCerts []*x509.Certificate) (*pkcs9.CounterSignature, error)

Types

type ManifestSignature

type ManifestSignature struct {
	Signature       *pkcs9.TimestampedSignature
	Hash            crypto.Hash
	AssemblyName    string
	AssemblyVersion string
	PublicKeyToken  string
}

func Verify

func Verify(manifest []byte) (*ManifestSignature, error)

Extract and verify signature on an application manifest. Does not verify X509 chains.

type SignedManifest

type SignedManifest struct {
	ManifestSignature
	Signed          []byte
	EncryptedDigest []byte
}

func Sign

func Sign(manifest []byte, cert *certloader.Certificate, opts crypto.SignerOpts) (*SignedManifest, error)

Sign an application manifest

func (*SignedManifest) AddTimestamp

func (m *SignedManifest) AddTimestamp(token *pkcs7.ContentInfoSignedData) error

Attach a timestamp counter-signature

Jump to

Keyboard shortcuts

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