Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
func Sign(r io.Reader, cert *x509.Certificate, priv *rsa.PrivateKey) ([]byte, error)
Types ¶
type AlgorithmIdentifier ¶
type AlgorithmIdentifier struct { Algorithm asn1.ObjectIdentifier Parameters asn1.RawValue }
type Attribute ¶
type Attribute struct { Type asn1.ObjectIdentifier Values []interface{} `asn1:"set"` }
func NewAttribute ¶
func NewAttribute(typ asn1.ObjectIdentifier, val interface{}) Attribute
type Attributes ¶
type Attributes []Attribute
type ContentInfo ¶
type ContentInfo struct { ContentType asn1.ObjectIdentifier Content asn1.RawValue `asn1:"optional"` }
type IssuerAndSerialNumber ¶
type SignedData ¶
type SignedData struct { Version int DigestAlgorithms []AlgorithmIdentifier `asn1:"set"` ContentInfo ContentInfo Certificates asn1.RawValue `asn1:"optional"` Crls asn1.RawValue `asn1:"optional"` SignerInfos []SignerInfo `asn1:"set"` }
type SignedDataWrapper ¶
type SignedDataWrapper struct { Oid asn1.ObjectIdentifier SignedData asn1.RawValue }
type SignerInfo ¶
type SignerInfo struct { Version int SignedIdentifier IssuerAndSerialNumber DigestAlgorithm AlgorithmIdentifier AuthenticatedAttributes Attributes `asn1:"tag:0"` DigestEncryptionAlgorithm AlgorithmIdentifier EncryptedDigest []byte UnauthenticatedAttributes int `asn1:"optional"` }
Click to show internal directories.
Click to hide internal directories.