Less TSA, fix benchmark

This commit is contained in:
Jeroen Bobbeldijk
2017-09-30 15:51:01 +02:00
parent bb93a21027
commit 8f1562c545
2 changed files with 2 additions and 2 deletions

View File

@@ -201,7 +201,7 @@ func (context *SignContext) SignPDF() error {
// Add estimated size for TSA.
// We can't kow actual size of TSA until after signing.
if context.SignData.TSA.URL != "" {
context.SignatureMaxLength += uint32(hex.EncodedLen(5000))
context.SignatureMaxLength += uint32(hex.EncodedLen(4000))
}
// Fetch revocation data before adding signature placeholder.

View File

@@ -287,7 +287,7 @@ func BenchmarkSignPDF(b *testing.B) {
}
for n := 0; n < b.N; n++ {
input_file.Seek(0, 0)
err = Sign(input_file, ioutil.Discard, rdr, size, SignData{
Signature: SignDataSignature{