verify

package
v0.0.0-...-43af263 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2024 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Certificate  *x509.Certificate `json:"certificate"`
	VerifyError  string            `json:"verify_error"`
	OCSPResponse *ocsp.Response    `json:"ocsp_response"`
	OCSPEmbedded bool              `json:"ocsp_embedded"`
	CRLRevoked   time.Time         `json:"crl_revoked"`
	CRLEmbedded  bool              `json:"crl_embedded"`
}

type DocumentInfo

type DocumentInfo struct {
	Author     string `json:"author"`
	Creator    string `json:"creator"`
	Hash       string `json:"hash"`
	Name       string `json:"name"`
	Permission string `json:"permission"`
	Producer   string `json:"producer"`
	Subject    string `json:"subject"`
	Title      string `json:"title"`

	Pages        int       `json:"pages"`
	Keywords     []string  `json:"keywords"`
	ModDate      time.Time `json:"mod_date"`
	CreationDate time.Time `json:"creation_date"`
}

DocumentInfo contains document information

type Response

type Response struct {
	Error string

	DocumentInfo DocumentInfo
	Signers      []Signer
}

func File

func File(file *os.File) (apiResp *Response, err error)

func Reader

func Reader(file io.ReaderAt, size int64) (apiResp *Response, err error)

type Signer

type Signer struct {
	Name               string               `json:"name"`
	Reason             string               `json:"reason"`
	Location           string               `json:"location"`
	ContactInfo        string               `json:"contact_info"`
	ValidSignature     bool                 `json:"valid_signature"`
	TrustedIssuer      bool                 `json:"trusted_issuer"`
	RevokedCertificate bool                 `json:"revoked_certificate"`
	Certificates       []Certificate        `json:"certificates"`
	TimeStamp          *timestamp.Timestamp `json:"time_stamp"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL