Documentation ¶
Index ¶
Constants ¶
const ( ObjIDData = "1.2.840.113549.1.7.1" ObjIDSignedData = "1.2.840.113549.1.7.2" ObjIDEncryptedData = "1.2.840.113549.1.7.6" )
Object identifier strings of the three implemented PKCS7 types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { Data []byte SignedData SignedData EncryptedData EncryptedData }
Content implements three of the six possible PKCS7 data types. Only one is non-nil.
type EncryptedContentInfo ¶
type EncryptedContentInfo struct { Raw asn1.RawContent ContentType asn1.ObjectIdentifier ContentEncryptionAlgorithm pkix.AlgorithmIdentifier EncryptedContent []byte `asn1:"tag:0,optional"` }
EncryptedContentInfo is a subtype of PKCS7EncryptedData.
type EncryptedData ¶
type EncryptedData struct { Raw asn1.RawContent Version int EncryptedContentInfo EncryptedContentInfo }
EncryptedData contains encrypted data. Used as a subtype in PKCS12.
type PKCS7 ¶
type PKCS7 struct { Raw asn1.RawContent ContentInfo string Content Content }
PKCS7 represents the ASN1 PKCS #7 Content type. It contains one of three possible types of Content objects, as denoted by the object identifier in the ContentInfo field, the other two being nil. SignedData is the degenerate SignedData Content info without signature used to hold certificates and crls. Data is raw bytes, and EncryptedData is as defined in PKCS #7 standard.
func ParsePKCS7 ¶
ParsePKCS7 attempts to parse the DER encoded bytes of a PKCS7 structure.
type SignedData ¶
type SignedData struct { Raw asn1.RawContent Version int Certificates []*x509.Certificate Crl *x509.RevocationList }
SignedData defines the typical carrier of certificates and crls.