[Poppler-bugs] [Bug 99271] make it possible to extract digital signature data (also in pdfsig)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jun 19 10:12:44 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99271

Hans-Ulrich Jüttner <huj at froreich-bioscientia.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #131973|0                           |1
        is obsolete|                            |

--- Comment #16 from Hans-Ulrich Jüttner <huj at froreich-bioscientia.de> ---
Created attachment 132053
  --> https://bugs.freedesktop.org/attachment.cgi?id=132053&action=edit
Patch fixing this bug and adding support for specification of a validation time

I changed the types of 'start' and 'end' to int as they are put into
GooString::getChar() which takes an int and would anyway produce an integer
overflow for values >= 2GB. I think that should fix the complaint about the
differing type of 'len'.

I looked for a solution of presenting a warning on invalid hash algorithm types
in method SignatureHandler::getHashAlgorithmName(). I found out that code using
poppler may call setErrorCallback() to prevent method error() from printing to
the console. So I think it's fine to use method error() for presenting the
warning.

Although I dislike tabs in code I now use them in the declaration of
struct SignatureValidationInfoPrivate in order to not replace the tabs
which were already there.

I also added a bugfix from the patch #99416 to method
FormWidgetSignature::getCheckedSignature() here:
-            if (sigLen > 0 && 2*(sigLen+lenBytes) < len-4)
+            if (sigLen > 0 && 2*(sigLen+lenBytes) <= len-4)
As Oliver Sander pointed out in a review to that patch, it does not belong
there. It definitely belongs here.

I hope you will be satisfied with the new patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20170619/ec36a3af/attachment.html>


More information about the Poppler-bugs mailing list