Documentation
¶
Overview ¶
Package pades seals a PDF with a PAdES baseline signature at level B-LTA: a CAdES signature with a signature timestamp, the validation data in a document security store, and a document timestamp over all of it.
Each step is an incremental update, so every byte of the document as given stays a prefix of the sealed file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrKeyMismatch = errors.New("the sealing certificate is not for the signer's key") ErrReservationTooSmall = errors.New("signature contents larger than reserved") )
Errors in the sealer's own setup; they are not the document's fault, so none is classed as client input.
Functions ¶
func ByteRangeContent ¶
ByteRangeContent returns what a signature with this byte range covers in the revision it signed, which ends where the range does.
func QualifiedForSeals ¶
func QualifiedForSeals(certificate *x509.Certificate) bool
QualifiedForSeals reports whether the certificate states, in its QC statements, that it is an EU qualified certificate for electronic seals.
Types ¶
type Sealer ¶
type Sealer struct {
Signer crypto.Signer
// Certificates is the sealing certificate first, then its issuers.
Certificates []*x509.Certificate
Timestamper tsa.Timestamper
Collector *validation_data.Collector
Now func() time.Time
}
Sealer seals documents with one key and its certificate chain.