Closed soa-x closed 3 years ago
+1. Waiting for this feature!..
When this functionality will be available? What happened to the progress of viveksjain?
@complience Hi, I have a proof-of-concept working at https://github.com/viveksjain/pdf.js/tree/sig-verify-support. You can try it by using git clone --recursive https://github.com/viveksjain/pdf.js.git. With a little bit more work it Should be ready for a pull request into esta repo, but I just Have not Had the time yet.
@lexcorp Unfortunately this became a lower priority for me after my previous message. I'll see if I can get around to it, but not going to make any promises I can't keep…
I'm trying to compile this version: https://github.com/viveksjain/pdf.js/tree/sig-verify-support When I enter the command: node make generic I get the message: ### Getting extension build number And the compilation process is not performed
How I can resolve this error? I am doing something wrong? Why not end the compilation? unfortunately the console does not send me more information to solve
@lexcorp If there's still any interest, at least my version is updated enough to compile. :+1:
Hi Vivek, yes I´m still interest, thank you...
2016-12-12 12:55 GMT-06:00 Gustavo Zambonin notifications@github.com:
@lexcorp https://github.com/lexcorp If there's still any interest, at least my version is updated enough to compile. 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla/pdf.js/issues/1076#issuecomment-266518165, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfB-LbmIVIrJLnxwJlm8aDITDKh5tWLks5rHZi5gaJpZM4BlvMP .
Hey Gustavo, thanks...
2016-12-12 12:55 GMT-06:00 Gustavo Zambonin notifications@github.com:
@lexcorp https://github.com/lexcorp If there's still any interest, at least my version is updated enough to compile. 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla/pdf.js/issues/1076#issuecomment-266518165, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfB-LbmIVIrJLnxwJlm8aDITDKh5tWLks5rHZi5gaJpZM4BlvMP .
is there an issue to why the support for digital signatures does not get pulled into pdf.js?
Please follow the discussion in #7702.
I am interested in hearing from people about their use cases for signature verification in PDFjs. Please email me at ryan at peculiarventures.com with your use case.
I would also be interested in hearing your use cases for signing in PDFjs, if you care about that scenario I would also want to hear your use case.
The sig-verify-support branch of pdf.js does not support IE and firefox perfectly cause WebCrypto can not be get, any idea to deal with it?
Hi folks - Is digital signature verification already working?
Same question here: Are digital signatures supposed to work with the latest stable build which can be downloaded from https://mozilla.github.io/pdf.js/getting_started/#download ?
FWIW: I've tested the currently available beta release and can't see any signatures. The only thing I notice is the following line in the browser console:
Warning: Unimplemented widget field type "Sig", falling back to base field type
No, digital signatures are not implemented yet. Anyone who is willing to work on this is welcome to submit a pull request. Thanks.
I want work on this functionality. Someone can give me some guidelines about internal components of PDF.js?
There is some initial work mentioned above that you may be able to use. Make sure to read the wiki for code style and testing instructions.
@wolvz : hi which part in viewer.js would that uncomment be? your repository looks to be the original source for pdf.js
most users though would use the stable version files.
As Adobe Acrobat plugin will be obsolete when Mozilla Firefox 59 ESR will be released, features like displaying digital signatures are now really required in pdf.js for enterprise users.
We have implemented a digital signature solution based on PKIjs and PDFjs that is capable of verifying and creating digital signatures. You can see an example of it viewing the US Digital Signature law here.
The viewer currently trusts the CAs on the eIDAS Trust List as well the Mozilla trusted S/MIME issuers.
If you encounter any issues email me at ryan@peculiarventures.com with sample files if any.
@rmhrisk can you provide a github repo with a sample code?
@xrkolovos the large majority of the work necessary to make signing and verifying work has been open sourced; it includes https://github.com/PeculiarVentures/PKI.js, https://github.com/PeculiarVentures/ASN1.js, https://github.com/PeculiarVentures/xadesjs/, https://github.com/PeculiarVentures/tl-create, and https://github.com/PeculiarVentures/webcrypto-liner.
We also ended up creating our own PDF library (though we use PDFjs for rendering) so we can create the many different types of signatures PDF allows for. This library will eventually be made public but its not ready for public consumption at this point.
The source to our viewer won't be made public but with the above libraries someone could reproduce verification in their own viewers. We have a basic example of how to do this here: https://pkijs.org/examples/PDFexample.html it would just need to be integrated into your viewers.
when will it be merged with pdf.js ?
@Aarbel at this point I don't know when we will find the time to refactor what we have so it could be easily be merged but we would like to see verify finding itself in PDFjs. With that said the PDFjs team has previously expressed concern over the size this feature would represent due to the necessary dependencies. As long as this is a concern it won't make sense to spend the engineering time to do this work.
IMHO, not implementing it before Firefox 59 (ESR) is released would mean the end of Firefox in enterprise if Chrome or Edge can read digital signatures.
@FrenchHope neither chrome of firefox can verify digital signatures.
Any update on this functionality?
@Snuffleupagus @yurydelendik @timvandermeij ? :)
As I explained in https://github.com/mozilla/pdf.js/pull/7702#pullrequestreview-4866355, first step will be to create an abstract API that allow to integrate any custom PKI/crypto with PDF.js.
@rmhrisk I dont care about Chrome users. I care about Firefox entreprise users. Many will now use Edge browser or Internet Explorer if Firefox cannot anymore verify digital signatures with Adobe Acrobat Reader plugin.
Many companies migrate to Windows 10 now...
Neither can Edge or IE.
@rmhrisk IE can, with Adobe Acrobat Reader ActiveX.
edit : Edge can display the digital signature but does not inform you of the validity of the signature as Adobe Acrobat Reader does.
ActiveX has been deprecated and will eventually not work.
Edge Does not snow the digital signature it shows the image in an annotation regardless of the status of the signature.
Hello, what is the current status of this feature?
It's not being worked on right now, but recently someone showed interest in the code above on IRC. The first step would really be https://github.com/mozilla/pdf.js/issues/1076#issuecomment-374244765.
Hi, do you have any expected date like Dic 2018 or maybe 2019 to release that API? Thanks for the pdf viewer by the way, works excellent
I wanted to implement the simple fix that was mentioned above... Commenting out the following lines:
// Hide signatures because we cannot validate them.
if (data.fieldType === 'Sig') {
_this2.setFlags(AnnotationFlag.HIDDEN);
}
However, this is causing an error in the console (from util.js:418). Does anyone know what causes this issue (Other than the fact that the signature is now displayed)?
Error:
Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': function nonSerializableClosure() {
return nonSerializable; // creating closure on some variable
} could not be cloned.
at eval (http://localhost:8888/src/shared/util.js:418:20)
@brianholle I tried and if you comment out
if (data.fieldType === 'Sig') {
warn('unimplemented annotation type: Widget signature');
// this.setFlags(AnnotationFlag.HIDDEN);
}
in built pdf.worker.js, then it works.
It would be nice to at least provide option for this. In our case for example, we already know that signature is valid, because we validate signatures before.
@strazovan Thanks, and agreed. I created a flag that can be set in default_preferences.json. I can post those changes if you are interested!
@brianholle Hello, I'll follow your example. Annotated with this code, chrome displays normally, but the digitally signed image in IE browser obscures the text.
@hanxiaodao You are saying that when commenting out the blocking code:
if (data.fieldType === 'Sig') {
warn('unimplemented annotation type: Widget signature');
// this.setFlags(AnnotationFlag.HIDDEN);
}
You have issues displaying in IE?
@brianholle Thank you for your reply. I follow your example,but there was a problem in IE 11. The red chapter of digital signature obscures the text content. This is the effect on chrome. This is the effect on IE11.
Can we get any estimations from maintainers if any efforts will be put into signatures verification?
It's not a priority for us right now, but if anyone wants to contribute this (see the comments above for how it should be implemented), then we are willing to look into integrating this in PDF.js.
We are also interested in showing digital signatures which can not be verified. Please, see an example attachted. Verpf-Erklärg-Bundesdatenschutz-Sig.pdf
when I comment: if (data.fieldType === 'Sig') { // this.setFlags(AnnotationFlag.HIDDEN); }
error:
message_handler.js:87 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': #<DedicatedWorkerGlobalScope> could not be cloned.
at eval (http://localhost:8888/src/shared/message_handler.js:87:21)
and why don't render the "div. annotationLayer"
Hahaa , I know this one ... it's related to #10350 . So you need to comment this line: // this.setFlags(AnnotationFlag.HIDDEN); and add this line after that: data.fieldValue = null;
How to config the pdf or pdf_viewer to enable the util.js that control the seal displayed switch? There are some AnnotationFlag options in util.js file like INVISIBLE 0x01、HIDDEN 0x02. I modify the AnnotionFlag in pdf.worker.js from HIDDEN to PRINT. Can I config them without this way?
Should be a very nice feature. Hopefully this would be a feature soon!
Hi! We are interested about when or if you´re going to implement the Signature Data View (Xades, Pades & Cades) in the PDF viewer (PDF.js)
Kind Regards
Alejandro Pinedo, SOA-X