Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/11/11)Fwd 1 day (to 2020/11/13)>>>20201112 
malc_ docs/thirdparty.html has some stale information as far as i can tell (luratech), copyright years in NOTE are possibly wrong00:25.48 
  scratch last part, copyright ears are wrong period00:27.17 
  extra comma after "etc" in coding-style.html00:29.44 
artifexirc-bot <sebras> @ator @Robin_Watts http://git.ghostscript.com/?p=user/sebras/mupdf.git;a=commitdiff;h=5655f62115f7d778b98c34b77f2342770371d499 LGTY?12:13.29 
  <sebras> @artifexirc-bot you are repeating yourself...12:15.58 
  <Robin_Watts> looking.12:17.09 
  <Robin_Watts> @sebras lgtm.12:17.39 
  <sebras> @Robin_Watts I sent you and @ator a set of tests last night. did you get them?12:21.25 
  <Robin_Watts> I have them here (sorry, hadn't seen them until now)12:22.00 
  <sebras> ok. have a look at them when its suitable for you.12:25.30 
  <Robin_Watts> @sebras You have a consistent typo of "Arhur" in signatures.txt12:25.36 
  <Robin_Watts> In what way was the GUI incapable of making these test files? Just the clearSignature thing?12:26.12 
  <Robin_Watts> (Not that we need the GUI to be able to make them before we commit them! Manually written files are entirely acceptable)12:26.38 
  <Robin_Watts> Otherwise they all look like good tests to me. Thanks for doing that.12:27.28 
malc_ Robin_Watts: can you please rename artifexirc-bot? the messages this bot posts take too much real estate due to ungodly length of the nick12:32.39 
artifexirc-bot <Robin_Watts> Not easily. It needs to have a registered name with freenode.12:33.30 
malc_ Robin_Watts: at least consider this as a feature request12:34.43 
Robin_Watts malc_: ator has a hexchat script that rewrites incoming messages to remove the botname.12:35.22 
clam oh gee it's even worse in irssi12:35.28 
Robin_Watts I'm sure something similar is possible using emacs.12:35.34 
malc_ Robin_Watts: ah, okay, good to know, will help me to hone my elisp skills too12:36.26 
artifexirc-bot <sebras> @Robin_Watts that is to match the typo of Slartibartfast. 😉12:41.06 
  <sebras> @Robin_Watts the other reason is that opening the file, signing it, and then clearing it will not allow you to sign it again in mupdf-gl.12:42.37 
  <sebras> that looks like a bug to me, but I haven't investigated it.12:42.50 
  <Robin_Watts> hmm. but closing the file and reopening it allows it to work?12:43.27 
  <Robin_Watts> or just doing it without the GUI getting in the way works?12:43.45 
  <sebras> manual reloading does not help at least.12:44.46 
  <sebras> in mupdf-gl. doing it from the command line appear to work. so I'm assuming it is something in the gl UI.12:45.07 
sebras ator: gÃ¥r bra för mig.13:19.03 
ator sebras: Applying: Add signature test suite.13:20.17 
  .git/rebase-apply/patch:125: new blank line at EOF.13:20.17 
sebras ator: that's surprising. I generated the patch using git form-patch?13:21.01 
  format-patch.13:21.06 
  ah, in signatures.txt13:22.34 
  ator: I placed an updated 0001-Add-signature-test-suite.patch in my home directory on casper.13:23.47 
ator sebras: I haven't got much to add to that test suite.13:26.05 
  your mupdf "Add clear signature trace." commit LGTM13:26.25 
sebras ator: I've already pushed that I believe.13:27.03 
  ator: can you try one thing for me? open a form pdf, sign the signature, clear it and try to sign it again.13:27.25 
ator sebras: so you have!13:27.26 
sebras for me this no longer works.13:27.31 
  but I sense that it did work a while ago..?13:27.42 
  have I lost some patches somewhere?13:27.53 
ator error: Failed to obtain public key13:28.10 
  maybe I forgot my password..13:28.23 
sebras ator: I've started to name my files whatever-password-is-password123.pfx or something along those lines. or else I'll forget.13:29.07 
ator it's kind of annoying that you don't get an error message about a wrong password until *after* you've selected where to save the file13:29.21 
  I would've thought that dialog would repeat until you provide a password, or cancel13:29.35 
  provide a *correct* password13:29.45 
  sebras: it seems to work for me13:32.09 
  smpapp2009 - Copy.pdf at least works13:32.21 
  I guess the 'you must save now or else!' behavior is new and desired?13:32.53 
  to workaround the issue with signing multiple times?13:33.00 
sebras I think so.13:34.15 
ator sebras: I put some notes on how to create a signature file in docs/manual-mutool-sign.html13:34.28 
sebras but from a UI point of view I think that behaviour is problematic.13:34.31 
ator I really dislike that behavior :(13:35.22 
  mutool sign -v smpapp2009\ -\ Copy1.pdf13:37.28 
  Verifying signature 434:13:37.28 
  Designated name: CN=Test Testsson, O=Internet Widgits Pty Ltd, OU=, emailAddress=test@example.com, C=AU13:37.28 
  Certificate error: Self-signed certificate.13:37.28 
  The document is unchanged since signing.13:37.28 
  that was after clearing and signing the signature on page 713:37.49 
artifexirc-bot <paulgardiner> What part of it?13:41.25 
sebras ator: I can repeat that. this is what signing successfully has always looked like for me.13:45.34 
  ator: I'm assuimging the Certificate error is because my certificate has not been issued by a trusted CA..?13:45.53 
ator sebras: my PFX is self-signed13:47.12 
sebras ator: ok, so then that output looks reasonable to me. where is the error? why did you quote it? /me is confused13:49.14 
ator sebras: you asked *me* if I could reproduce an error with clearing and a signature!?13:53.34 
  I could not.13:53.40 
sebras ator: in mupdf-gl.13:53.43 
  not using mutool sign.13:53.48 
ator that *was* in mupd-gl. I'm showing that the resulting file is fine, using mutool sign.13:53.59 
sebras really?13:54.10 
ator what kind of error do you see in mupdf-gl?+13:54.24 
sebras I can sign the signature in that file in mupdf-gl, and I can clear it successfully.13:56.21 
  but trying to sign it again I got a dialog box with only... agh. wait.13:57.41 
  now I _do_ get a dialog box with both "Sign" and "Cancel" buttons.13:58.29 
  but doing the same with pdf/sign/TestFormExpenses.pdf and signing the top most signature field I only get a dialog box with the "Cancel" button when resigning.13:59.00 
  re-signing.13:59.04 
ator sebras: where can I find that file?14:00.55 
sebras in tests_private14:01.00 
ator got it14:01.07 
sebras ok.14:01.10 
  signing the first time, and clearing works fine.14:01.39 
ator sebras: yes, I can reproduce that14:01.40 
  sign, clear, but only 'cancel' on the second time14:01.48 
sebras yes.14:01.52 
ator if (!(pdf_field_flags(ctx, sig_widget->obj) & PDF_FIELD_IS_READ_ONLY)) did the flags change when clearing?14:02.42 
sebras probably.14:03.14 
  it looks like we're trying to remove PDF_ANNOT_IS_LOCKED14:03.30 
ator the FF changes from '0' in the original document to '1' after clearing it14:06.26 
  but it stays '0' in smpapp200914:06.53 
sebras oh, there were several /Ff entries. and then one in the signature seed dictionary does not apply.14:10.32 
ator hm, pdf_clear_signature messes with the /F flag, but pdf_field_flags uses /Ff14:11.38 
sebras maybe pdf_clear_sigantures() ought to mess with both.14:12.02 
ator but why does /Ff change when clearing the signature!?14:12.20 
  pdf_clear_signature changes /F and /V and rewrites the /AP14:13.54 
sebras when pdf_clear_signature() is called on the signed signature widget->obj already has /Ff 114:13.58 
ator nothing that should affect /Ff that I can see14:14.01 
sebras ^^14:14.34 
  I think it happens when pdf_sign_signature() calls enact_sig_locking().14:16.02 
  yes, line 141 in check_field_locking().14:17.02 
  ah, in the original PDF object 159 (the signature field object) has /Lock pointing to 175 which presumably tells mupdf-gl to lock fields when it is signed.14:20.50 
ator if it's locked maybe we shouldn't allow clearing it?14:21.56 
sebras this is mupdf.14:22.21 
  ator: hm.. I'm unable to sign this document in acroread.14:28.19 
  but acroread allows me to select the field. nothing happens when I click it.14:32.40 
  on my phone, the signature field is not even clickable.14:32.48 
  and this is all with the original file.14:32.53 
  as normal with digital signatures I'm confused. is this supposed to work or not?14:44.48 
artifexirc-bot <ator> ¯\_(ツ)_/¯14:47.59 
  <paulgardiner> I've just come back and skim read, so I may be missunderstanding, but one difference between mupdf and AR I've noticed - mupdf wont allow locked fields to be selected, whereas AR allows selection but not alteration. Might that explain some of the confusion?15:02.19 
sebras @paulgardiner: if the original document TestFormExpenses.pdf had had its signature field locked, sure. but the initial version of the document doesn't.15:03.20 
  the signature field does get locked (according to the PDF object at least) after I have signed the signature.15:03.46 
artifexirc-bot <paulgardiner> Which comment above describes the problem we're worried about?15:05.38 
  <sebras> > sign, clear, but only 'cancel' on the second time15:07.46 
  <sebras> @paulgardiner.15:07.47 
  <paulgardiner> Oh right. I can imagine that clear with signatures is very hard to get right.15:09.51 
sebras @paulgardiner it looks like the signature field is locked, but then not unlocked when we clear it.15:10.40 
  I'm trying to deduce what Lock means according to the spec atm.15:10.53 
  ator: when saving a file, e.g. due to signing, should we confirm to replace an existing file perhaps?15:25.36 
ator sebras: hm, I thought I'd implemented that already, but now I can't find any trace of it... maybe I just planned to?15:32.56 
sebras you did for reloading I think.15:33.16 
  if it was dirty, confirm before reloading.15:33.38 
ator sebras: right!15:34.23 
  yes, we should probably warn before overwriting15:34.45 
  s/probably//15:34.55 
artifexirc-bot <paulgardiner> @sebras That sounds likely. Locking is complicated, but I think mostly it should be undone simply by removing the sig filed value. The bit you may be missing is that we make the field read only. The difficulty with undoing that is knowing whether it was already read only before the signing. That sounds really hard.16:25.06 
sebras @paulgardiner that is indeed what we're missing. the question is also: _should_ mupdf allow readonly field to be modified at all? should we be able to clear locked (i.e. read-only) signature fields?16:27.25 
artifexirc-bot <paulgardiner> Yes, that is a good question.16:28.06 
  <paulgardiner> I've also wondered if we should even allow signatures to be cleared, but I started wondering it too late for it to be a useful (and not just annoying) thought.16:28.58 
sebras @paulgardiner: acrobat allows clearing. but maybe not under all circumstances. I'm trying to find an alternative PDF that has locking to see how acrobat behaves.16:33.37 
malc_ @paulgardiner: can you please say something16:49.32 
artifexirc-bot <ator> @sebras I asked you that same question an hour ago. I don't think we should allow clearing a locked field (at least not in mupdf-gl)16:49.43 
sebras @ator I know, and I've been skimming the pdf spec during the meeting as well as looking for other pdfs that use locking (so I can see what acrobat does).16:50.36 
  @ator the best reference I've found is the third section on page 737 of pdfref17.pdf16:52.05 
  but sadly it doesn't clearly state what "locked" means.16:52.21 
  oh, it is mentioned in the 6th paragaph, "locked" implies "readonly", ok. then we _are_ doing that correctly. and Readonly according to table 8.16 means we shouldn't be able to clear the signature annotation.16:54.23 
  then we should error out even if this is done via js in mutool run imho.16:54.52 
  I'll look into that after the meeting.16:57.57 
ator sebras: yeah, and mutool sign.17:02.15 
sebras yeah.17:03.33 
  I'll look into it.17:03.38 
malc_ would somebody from discord say something17:09.08 
  +please17:09.16 
artifexirc-bot <ator> boo!17:09.53 
malc_ ator: thanks!17:10.57 
artifexirc-bot <ator> can emote too?17:11.15 
malc_ (setq erc-replace-alist '(("<artifexirc-bot> " . "@"))) did the trick17:11.25 
artifexirc-bot <ator> and does malc_ highlightings work as well!17:11.30 
malc_ ator: highlighting works17:12.06 
  emote... wtf is that?? what am i a teenage girl on a mobile phone?17:12.31 
ator you never heard of /me? that's an emote, since the dawn of the internet...17:13.17 
  malc_: I dunno, are you?!17:13.26 
  I doubt you're on a mobile phone...17:13.35 
malc_ ator: never heard of it, and mind you my first irc client was a bloody telnet, followed shortly by ircII... all while telixing into moscow state physics university and loging in into freebsd 117:15.26 
  i'm bloody hardcore17:15.39 
artifexirc-bot <Robin_Watts> /invite @chatExporterBot18:27.12 
  <sebras> @ator (for after the red fold) my commit on mupdf:sebras/signatures I think fixes the situation where locked signatures could be cleared/signed. tested in mupdf-gl, js and java only build tested (since my desktop java signature patches have not made it in yet). this affects my signature tests of course, so I'll fix those tomorrow.20:42.38 
  <sebras> oh! https://github.com/uclouvain/openjpeg/issues/1259#issuecomment-726332666 looks like something of mine has been merged. I wonder if there is a corresponding ghostscript bug that I need to dig up...20:49.28 
  <Fred> @sebras ping21:36.26 
  <Fred> or @Robin_Watts ?21:37.03 
  <Fred> Anyway, I've got a signing certificate with Korean in it.21:42.59 
  <Fred> During the signing process, we wind up in add_required_fonts, we do21:42.59 
  <Fred> cjk_font = fz_new_cjk_font(ctx, FZ_ADOBE_KOREA);21:43.01 
  <Fred> which throws.21:43.02 
  <Fred> @ator do you have an idea about this ^^^22:23.16 
  <ator> @fredrossperry I think we build without CJK fonts, to save space.22:28.30 
  <Fred> How do I build with CJK? remove the -DTOFUxxx defines?22:29.41 
  <ator> Yeah.22:30.17 
  <ator> I think we could improve the place that calls this though22:31.07 
  <ator> we have functions to use system fallback fonts, not sure why `fz_new_cjk_font` doesn't fall back to `fz_load_system_cjk_font` like the PDF code does.22:32.02 
  <ator> I can look into that tomorrow22:32.06 
  <ator> @fredrossperry actually, never mind that... we don't even use the cjk_font variable22:33.31 
  <Fred> OK. Let me know what you want to do tomorrow22:34.26 
  <ator> I cooked up a very quick patch, it's on tor/master now22:35.25 
  <ator> give that a try, if it doesn't work let me know and I'll investigate more tomorrow22:35.38 
  <ator> or maybe that function had a typo, and should be passing cjk_font rather than font to pdf_add_cjk_font. will investigate more later.22:37.22 
  <Fred> thanks22:42.31 
 <<<Back 1 day (to 2020/11/11)Forward 1 day (to 2020/11/13)>>> 
ghostscript.com #ghostscript
Search: