package pkcs7
import "git.wntrmute.dev/kyle/goutils/certlib/pkcs7"
Index ¶
- Constants
- type Content
- type Data
- type EncryptedContentInfo
- type EncryptedData
- type PKCS7
- type SignedData
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.
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 Data ¶
type Data struct { Bytes []byte }
Data contains raw bytes. Used as a subtype in PKCS12.
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.
Source Files ¶
pkcs7.go
- Version
- v1.7.7 (latest)
- Published
- Jun 15, 2024
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 days ago –
Tools for package owners.