Documentation
¶
Overview ¶
Package tsaservice provides a client for Time Stamping Authority (TSA) services.
Index ¶
- func VerifyCertificate(data []byte) ([]byte, error)
- type Accuracy
- type Attribute
- type ContentInfo
- type EUDSSVerifyCertificateRequest
- type EncapsulatedContentInfo
- type IssuerAndSerial
- type MessageImprint
- type PKIStatusInfo
- type SignedData
- type SignerInfo
- type TSAConfig
- type TSAService
- type TSTInfo
- type TimeStampReq
- type TimeStampResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyCertificate ¶
VerifyCertificate verifies a certificate using the EUDSS service.
Types ¶
type Attribute ¶
type Attribute struct {
Type asn1.ObjectIdentifier
Values []asn1.RawValue `asn1:"set"`
}
Attribute
type ContentInfo ¶
type ContentInfo struct {
ContentType asn1.ObjectIdentifier
Content asn1.RawValue `asn1:"explicit,optional,tag:0"`
}
ContentInfo (PKCS#7)
type EncapsulatedContentInfo ¶
type EncapsulatedContentInfo struct {
EContentType asn1.ObjectIdentifier
EContent asn1.RawValue `asn1:"explicit,optional,tag:0"` // This contains the OCTET STRING which is the TSTInfo (DER encapsulated)
}
type IssuerAndSerial ¶
IssuerAndSerial
type MessageImprint ¶
type MessageImprint struct {
HashAlgorithm pkix.AlgorithmIdentifier
HashedMessage []byte
}
MessageImprint structure
type PKIStatusInfo ¶
type SignedData ¶
type SignedData struct {
Version int
DigestAlgorithms []pkix.AlgorithmIdentifier `asn1:"set"`
EncapContentInfo EncapsulatedContentInfo
Certificates asn1.RawValue `asn1:"optional,tag:0"` // IMPLICIT SET OF Certificate
CRLs []asn1.RawValue `asn1:"optional,tag:1"`
SignerInfos []SignerInfo `asn1:"set"`
}
SignedData
type SignerInfo ¶
type SignerInfo struct {
Version int
IssuerAndSerial IssuerAndSerial
DigestAlgorithm pkix.AlgorithmIdentifier
AuthenticatedAttrs []Attribute `asn1:"optional,tag:0"` // IMPLICIT SET OF Attribute
DigestEncryptionAlgorithm pkix.AlgorithmIdentifier
EncryptedDigest []byte
UnauthenticatedAttrs []Attribute `asn1:"optional,tag:1"`
}
SignerInfo
type TSAService ¶
type TSAService struct {
CACert []byte
// contains filtered or unexported fields
}
func NewTSAService ¶
func NewTSAService(cfg *TSAConfig) (*TSAService, error)
type TSTInfo ¶
type TSTInfo struct {
Version int
Policy asn1.ObjectIdentifier
MessageImprint MessageImprint
SerialNumber *big.Int
GenTime time.Time
Accuracy Accuracy `asn1:"optional"`
Ordering bool `asn1:"optional,default:false"`
Nonce *big.Int `asn1:"optional"`
Tsa asn1.RawValue `asn1:"optional,tag:0"` // GeneralName
Extensions []pkix.Extension `asn1:"optional,tag:1"`
}
TSTInfo as per RFC 3161
type TimeStampReq ¶
type TimeStampReq 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:"optional,tag:0"`
}
TimestampReq structure as per RFC 3161
type TimeStampResp ¶
type TimeStampResp struct {
Status PKIStatusInfo
TimeStampToken asn1.RawValue `asn1:"optional"` // This is a ContentInfo
}
TimeStampResp
Click to show internal directories.
Click to hide internal directories.