Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRLChecker ¶
CRLChecker implements RevocationChecker using CRLs.
func NewCRLChecker ¶
func NewCRLChecker() *CRLChecker
func (*CRLChecker) Check ¶
func (c *CRLChecker) Check(ctx context.Context, cert *x509.Certificate, issuer *x509.Certificate) (RevocationStatus, error)
type ChainBuilder ¶
type ChainBuilder interface {
// BuildChain attempts to build a valid chain from the leaf certificate to a trusted root.
BuildChain(leaf *x509.Certificate, intermediates []*x509.Certificate, roots *x509.CertPool) ([][]*x509.Certificate, error)
}
ChainBuilder builds and verifies X.509 certificate chains.
type ChainBuilderImpl ¶
type ChainBuilderImpl struct {
}
func NewChainBuilder ¶
func NewChainBuilder() *ChainBuilderImpl
func (*ChainBuilderImpl) BuildChain ¶
func (b *ChainBuilderImpl) BuildChain(leaf *x509.Certificate, intermediates []*x509.Certificate, roots *x509.CertPool) ([][]*x509.Certificate, error)
type LTVManager ¶
type LTVManager interface {
// AddValidationInfo adds validation information (certs, OCSP, CRLs) to the DSS.
AddValidationInfo(ctx context.Context, doc *semantic.Document, vri *ValidationRelatedInfo) error
}
LTVManager manages Long Term Validation (LTV) information in the PDF. It handles the Document Security Store (DSS) dictionary.
type LTVManagerImpl ¶
type LTVManagerImpl struct{}
func NewLTVManager ¶
func NewLTVManager() *LTVManagerImpl
func (*LTVManagerImpl) AddValidationInfo ¶
func (m *LTVManagerImpl) AddValidationInfo(ctx context.Context, doc *semantic.Document, vri *ValidationRelatedInfo) error
type OCSPChecker ¶
OCSPChecker implements RevocationChecker using OCSP.
func NewOCSPChecker ¶
func NewOCSPChecker() *OCSPChecker
func (*OCSPChecker) Check ¶
func (c *OCSPChecker) Check(ctx context.Context, cert *x509.Certificate, issuer *x509.Certificate) (RevocationStatus, error)
type RevocationChecker ¶
type RevocationChecker interface {
// Check checks if the certificate is revoked.
Check(ctx context.Context, cert *x509.Certificate, issuer *x509.Certificate) (RevocationStatus, error)
}
RevocationChecker checks the revocation status of a certificate.
type RevocationStatus ¶
type RevocationStatus int
RevocationStatus represents the status of a certificate.
const ( StatusGood RevocationStatus = iota StatusRevoked StatusUnknown )
type ValidationRelatedInfo ¶
type ValidationRelatedInfo struct {
Certs [][]byte // DER encoded certificates
OCSPs [][]byte // DER encoded OCSP responses
CRLs [][]byte // DER encoded CRLs
}
ValidationRelatedInfo contains the validation data to be added.
Click to show internal directories.
Click to hide internal directories.