ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] digital signing in ConTeXt
@ 2024-06-17 17:51 Pablo Rodriguez via ntg-context
  2024-06-17 18:21 ` [NTG-context] " Henning Hraban Ramm
  2024-06-17 22:52 ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 12+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-17 17:51 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

the latest version of LMTX can digitally sign PDF documents. It requires
OpenSSL installed (since it does the crypto part).

I have two issues that I would like to be tested by others.

A sample certificate may be found at
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/ECSXLVMT3TMQBIHA2UZJPWJN7OVV5334/attachment/2/mycert.pfx
(I sent it myself).

Here is a sample document (actually provided by Hans):

  \setupinteraction[state=start]
  \definefield[signature][signed]
  \defineoverlay[signature][my signature]
  \starttext
    \startTEXpage[offset=1ts,frame=on,framecolor=darkblue]
      sign: \inframed[background=signature,framecolor=darkred]
              {\fieldbody[signature][width=3cm,option=hidden]}
    \stopTEXpage
  \stoptext

After compiling the sample, you need to run:

mtxrun --script pdf --sign --certificate=c.pfx --password=ABCabc doc.pdf

Password will be prompted again ("ABCabc"), since it is an encrypted
certificate (also for the public part).

Could anyone confirm the following issues?

1. The signature I get is wrong, unless I apply this patch
(https://mailman.ntg.nl/archives/list/dev-context@ntg.nl/message/T3OCKVZWTUTIXCSOKIFRVJ4X76MROZHE/attachment/3/byterange.diff
[sent by myself to the devel list]).

2. I cannot get any signature display in Acrobat. Does any PDF viewer (I
have tested this with pdfsig from poppler and MuPDF-GL) display the
digital signature at all?

Many thanks for your help,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-19 17:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 17:51 [NTG-context] digital signing in ConTeXt Pablo Rodriguez via ntg-context
2024-06-17 18:21 ` [NTG-context] " Henning Hraban Ramm
2024-06-17 18:36   ` Pablo Rodriguez via ntg-context
2024-06-17 22:52 ` Hans Hagen via ntg-context
2024-06-18  6:44   ` Pablo Rodriguez via ntg-context
2024-06-18  8:27     ` Hans Hagen via ntg-context
2024-06-18 16:26       ` Pablo Rodriguez via ntg-context
2024-06-18 16:42         ` Hans Hagen via ntg-context
2024-06-18 17:28           ` Pablo Rodriguez via ntg-context
2024-06-18 17:42             ` Pablo Rodriguez via ntg-context
2024-06-19  7:28               ` Hans Hagen via ntg-context
2024-06-19 16:59                 ` Pablo Rodriguez via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).