Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnySet ¶
AnySet is a helper for dealing with SET OF ANY types.
func DecodeAnySet ¶
DecodeAnySet manually decodes a SET OF ANY type, since Go's parser can't handle them.
type AppleHashAgility ¶
type AppleHashAgility struct { Type asn1.ObjectIdentifier Content asn1.RawValue `asn1:"explicit,tag:0"` }
type Attribute ¶
type Attribute struct { Type asn1.ObjectIdentifier // This should be a SET OF ANY, but Go's asn1 parser can't handle slices of // RawValues. Use value() to get an AnySet of the value. RawValue asn1.RawValue }
func GetTimestamp ¶
func GetTimestamp(url, proxy string, insecure bool, si SignerInfo) (Attribute, error)
func NewAttribute ¶
func NewAttribute(typ asn1.ObjectIdentifier, val interface{}) (attr Attribute, err error)
type Attributes ¶
type Attributes []Attribute
func (Attributes) MarshaledForSigning ¶
func (attrs Attributes) MarshaledForSigning() ([]byte, error)
type CDHash ¶
type CDHash struct {
CDHashes [][]byte `plist:"cdhashes,omitempty" xml:"cdhashes,omitempty"`
}
type ContentInfo ¶
type ContentInfo struct { ContentType asn1.ObjectIdentifier Content asn1.RawValue `asn1:"explicit,tag:0"` }
type EncapsulatedContentInfo ¶
type EncapsulatedContentInfo struct { EContentType asn1.ObjectIdentifier EContent asn1.RawValue `asn1:"optional,explicit,tag:0"` }
func (EncapsulatedContentInfo) EContentValue ¶
func (eci EncapsulatedContentInfo) EContentValue() ([]byte, error)
type IssuerAndSerialNumber ¶
type MessageImprint ¶
type MessageImprint struct { HashAlgorithm pkix.AlgorithmIdentifier HashedMessage []byte }
type PKIFreeText ¶
type PKIStatusInfo ¶
type PKIStatusInfo struct { Status int StatusString PKIFreeText `asn1:"optional"` FailInfo asn1.BitString `asn1:"optional"` }
type Request ¶
type Request struct { Version int MessageImprint MessageImprint ReqPolicy asn1.ObjectIdentifier `asn1:"optional"` Nonce *big.Int `asn1:"optional"` CertReq bool `asn1:"optional,default:false"` Extensions []pkix.Extension `asn1:"tag:1,optional"` }
type Response ¶
type Response struct { Status PKIStatusInfo TimeStampToken ContentInfo `asn1:"optional"` }
type SignedData ¶
type SignedData struct { Version int DigestAlgorithms []pkix.AlgorithmIdentifier `asn1:"set"` EncapContentInfo EncapsulatedContentInfo Certificates []asn1.RawValue `asn1:"optional,set,tag:0"` CRLs []asn1.RawValue `asn1:"optional,set,tag:1"` SignerInfos []SignerInfo `asn1:"set"` }
func NewSignedData ¶
func NewSignedData(data []byte) (*SignedData, error)
func (*SignedData) AddCertificate ¶
func (sd *SignedData) AddCertificate(cert *x509.Certificate) error
func (*SignedData) AddTimestamps ¶
func (sd *SignedData) AddTimestamps(url, proxy string, insecure bool) error
func (*SignedData) Detached ¶
func (sd *SignedData) Detached()
func (*SignedData) Sign ¶
func (sd *SignedData) Sign(chain []*x509.Certificate, privateKey any) error
func (*SignedData) ToDER ¶
func (sd *SignedData) ToDER() ([]byte, error)
type SignerInfo ¶
type SignerInfo struct { Version int SID asn1.RawValue DigestAlgorithm pkix.AlgorithmIdentifier SignedAttrs Attributes `asn1:"optional,tag:0"` SignatureAlgorithm pkix.AlgorithmIdentifier Signature []byte UnsignedAttrs Attributes `asn1:"set,optional,tag:1"` }
Click to show internal directories.
Click to hide internal directories.