Skip to content

Commit

Permalink
Remove repeated line and improve naming consistency
Browse files Browse the repository at this point in the history
* The line `psi = tbs_document.post_sign_instructions` needlessly appeared twice in the code.

* The first part's `output` variable is used as `output_handle` in the second part. Make both names consistent.
  • Loading branch information
dspinellis committed Jan 21, 2024
1 parent 7aef45a commit df95c0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/lib-guide/signing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -817,16 +817,15 @@ remote signers that supply complete CMS objects.
),
timestamper=timestamps.HTTPTimeStamper('http://tsa.example.com')
)
prep_digest, tbs_document, output = \
prep_digest, tbs_document, output_handle = \
await pdf_signer.async_digest_doc_for_signing(w)
md_algorithm = tbs_document.md_algorithm
psi = tbs_document.post_sign_instructions
signed_attrs = await ext_signer.signed_attrs(
prep_digest.document_digest, 'sha256', use_pades=True
)
psi = tbs_document.post_sign_instructions
return prep_digest, signed_attrs, psi, output
return prep_digest, signed_attrs, psi, output_handle
# After prep_document finishes, you can serialise the contents
# of prep_digest, signed_attrs and psi somewhere.
Expand Down

0 comments on commit df95c0b

Please sign in to comment.