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 ¶
Convert public key to "snk" format
func PublicKeyToken ¶
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)
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
Click to show internal directories.
Click to hide internal directories.