[Poppler-bugs] [Bug 16770] support for digital signatures
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 2 15:56:48 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=16770
--- Comment #53 from Albert Astals Cid <aacid at kde.org> ---
I've had look at the code (in poppler/ not glib/ i'll leave that to the glib/
experts) and have some minor and some major comments.
Minor:
* There's 3 use of malloc i could find, for completion i guess it's better if
you use gmalloc
* SigStatusStruct should be a C++ class
Medium:
* I'm not convinced getSigningTime should return a char *, i'd very much
prefer it returning an integer and shifting the responsability to turn it into
a string to upper layers, since allows for translations, etc.
Major:
* There's lots of repeated code (the loops searching for "Annot"+"Sig" some of
these with more checks for nulls than others) and some functions that make no
sense in PDFDoc like Object *getByteRange(int index);
If you see in Form::Form we're already parsing "Fields" and creating
FormFieldSignature for each "Sig" object.
My suggestion is that you expand FormFieldSignature with your implementation.
That also solves API issues like for for example getSignerName should not be in
PDFDoc since you need to have called validateSignature before and then it
returns the signer name for the signature of that index, so it should be part
of a signature object, i.e. FormFieldSignature.
Do you think it makes sense?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20150902/8ab49de9/attachment.html>
More information about the Poppler-bugs
mailing list