Versions in this module Expand all Collapse all v1 v1.0.0 Mar 17, 2017 Changes in this version + var ErrNotEncryptedContent = errors.New("pkcs7: content data is a decryptable data type") + var ErrUnsupportedAlgorithm = errors.New(...) + var ErrUnsupportedContentType = errors.New("pkcs7: cannot parse data: unimplemented content type") + func DegenerateCertificate(cert []byte) ([]byte, error) + func Encrypt(content []byte, recipients []*x509.Certificate) ([]byte, error) + type Attribute struct + Type asn1.ObjectIdentifier + Value interface{} + type MessageDigestMismatchError struct + ActualDigest []byte + ExpectedDigest []byte + func (err *MessageDigestMismatchError) Error() string + type PKCS7 struct + CRLs []pkix.CertificateList + Certificates []*x509.Certificate + Content []byte + Signers []signerInfo + func Parse(data []byte) (p7 *PKCS7, err error) + func (p7 *PKCS7) Decrypt(cert *x509.Certificate, pk crypto.PrivateKey) ([]byte, error) + func (p7 *PKCS7) GetOnlySigner() *x509.Certificate + func (p7 *PKCS7) UnmarshalSignedAttribute(attributeType asn1.ObjectIdentifier, out interface{}) error + func (p7 *PKCS7) Verify() (err error) + type SignedData struct + func NewSignedData(data []byte) (*SignedData, error) + func (sd *SignedData) AddCertificate(cert *x509.Certificate) + func (sd *SignedData) AddSigner(cert *x509.Certificate, pkey crypto.PrivateKey, config SignerInfoConfig) error + func (sd *SignedData) Finish() ([]byte, error) + type SignerInfoConfig struct + ExtraSignedAttributes []Attribute