Skip to content

Use of Belgian ID Card (Windows OS) #100

Discussion options

You must be logged in to vote

Hi @AlainCNpt, I finally found the time to look at your actual files (thanks for sending those along!) and the problem is now obvious---sorry I didn't spot it earlier...

The signature container in your signed file is zeroed out. The reason why that is the case is because you're overwriting the content of the signed file with the contents of the incremental updater in its state prior to the signature being produced.

In other words, these lines are the problem:

 out = signers.sign_pdf(w, signature_meta, signer=beid) # , timestamper=tsa_client)

docSigned = open(filenameSigned, 'wb')
w.write(docSigned)
docSigned.close()

In actuality, the output you want is in out, not in the file pointed to by

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@AlainCNpt
Comment options

@AlainCNpt
Comment options

@AlainCNpt
Comment options

@MatthiasValvekens
Comment options

Answer selected by AlainCNpt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants