Documentation ¶
Index ¶
- Constants
- func PublicKeyToSnk(pubKey crypto.PublicKey) ([]byte, error)
- func PublicKeyToken(pubKey crypto.PublicKey) (string, error)
- func PublisherIdentity(cert *certloader.Certificate) (string, string, error)
- func VerifyTimestamp(timestamp *pkcs7.ContentInfoSignedData, encryptedDigest []byte, ...) (*pkcs9.CounterSignature, error)
- type ManifestSignature
- type SignedManifest
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)
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
Click to show internal directories.
Click to hide internal directories.