Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //OIDSignedData is signedData OIDs OIDSignedData = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 2} //OIDContentType is one of Attributes OIDContentType = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 3} //OIDSigningTime is one of Attributes OIDSigningTime = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 5} //OIDMessageDigest is one of Attributes OIDMessageDigest = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 9, 4} //OIDPKCS7 is PKCS#7 OIDPKCS7 = asn1.ObjectIdentifier{1, 2, 840, 113549, 1, 7, 1} //OIDSpcStatementTypeObjID 1.3.6.1.4.1.311.2.1.11 OIDSpcStatementTypeObjID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 2, 1, 11} //OIDSpcSPOpusInfoObjID 1.3.6.1.4.1.311.2.1.12 OIDSpcSPOpusInfoObjID = asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 311, 2, 1, 12} )
Functions ¶
This section is empty.
Types ¶
type PKCS7 ¶
type PKCS7 struct { Raw interface{} ContentType asn1.ObjectIdentifier // should be signedData Version int // signedData version DigestAlgorithmIdentifiers []pkix.AlgorithmIdentifier // used to sign the contents of the ContentInfo type Certificates []*x509.Certificate // list of x509 certs CRLs []pkix.CertificateList // CRLs SignerInfos []signerInfo // list of signature information }
PKCS7 has SignData and signature information (signerInfo) Because Authenticode signatures support only one signer, digestAlgorithms must contain only one digestAlgorithmIdentifier structure and the structure must match the value set in the SignerInfo structure's digestAlgorithm field. If not, the signature has been tampered with.
func ParsePKCS7 ¶
ParsePKCS7 decodes a DER encoded PKCS7 package It returns a PKCS#7
Click to show internal directories.
Click to hide internal directories.