PDF-Sign error



  • Hello, I'm trying to digitally sign pdf documents using a certificate, but when I upload a certificate with .pfx extension, jsreport studio page becomes white and does not allow to display the certificate or the posibility to add the password. I have change the extension certificate to .p12 to solve the previous problem, but with this certificate, the document is not signed correctly, and Adobe Acrobat shows an Invalid Signature error.

    0_1626812132661_captura1.png

    However, if I install the certificate and sign it from Adobe Reader, it works properly.

    Could you please help me with this issue?

    Thank you in advance!!



  • What's your jsreport version? Do you have some extra versions of the extensions?



  • Hello, the versions of all instaled packages are as follows :

    "dependencies": {
    "jsreport": "^2.11.0",
    "jsreport-assets": "^1.7.0",
    "jsreport-pdf-sign": "^0.4.0",
    "jsreport-pdf-utils": "^1.11.0",
    "jsreport-wkhtmltopdf": "^2.3.0",
    "react": "^16.14.0",
    "webpack": "^3.10.0"
    }



  • It turned out there is a bug in the asset extension for uploading the pfx.
    However, rename to p12 should work. Could you translate the error to English for me?
    I'm not sure if this is a problem with a certificate or with pdf.
    Could you try to create a new p12 certificate and try to sign?

    Note "jsreport-assets": "^1.7.0", is already part of jsreport@2.11.
    "jsreport-pdf-sign": "^0.4.0", is deprecated and already integrated into pdf utils https://jsreport.net/learn/pdf-utils#sign-using-studio



  • Hello, I have installed jsreport again, without installing any additional extensions. I attach an image of the translated Adobe Acrobat error and the jsrpeort initialization.

    0_1626866135724_extenisons.png
    0_1626866158336_error Adobe Reader.png

    I have tried to create a new p12 certificate and the digital signature is correct. The only diference between ther certificates that I import and the new ones that I created is as follow. The Intented Purposes of my certificates are Client Authentication and Secure Email, and the intented purposes of the new certificates created are All.
    Is it posible that the error is due to these intented purposes of my certificates?

    0_1626866188891_certificate error.png

    I have tried to generate the signed pdf from the POST, but the error is the same as if I generate them from the main page of jsreport.

    0_1626866399361_post.png



  • Thank you for the detailed information.

    Could you try to create a new cert also with Client Authentication and Secure Email just that we know the problem is really this and not the original certificate itself?

    Unfortunately, the signing logic is in a third-party library we use and I didn't find notes there about this topic.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.