DigestAlgorithm & SigningCertificate attribute

This commit is contained in:
Paul van Brouwershaven
2022-07-15 15:42:10 +02:00
parent 6224a363e9
commit dcc44d5779
5 changed files with 76 additions and 2 deletions

View File

@@ -71,8 +71,9 @@ err = sign.Sign(input_file, output_file, rdr, size, sign.SignData{
CertType: sign.CertificationSignature,
DocMDPPerm: sign.AllowFillingExistingFormFieldsAndSignaturesPerms,
},
Signer: privateKey, // crypto.Signer
Certificate: certificate, // x509.Certificate
Signer: privateKey, // crypto.Signer
DigestAlgorithm: crypto.SHA256, // hash algorithm for the digest creation
Certificate: certificate, // x509.Certificate
CertificateChains: certificate_chains, // x509.Certificate.Verify()
TSA: sign.TSA{
URL: "https://freetsa.org/tsr",