libresign icon indicating copy to clipboard operation
libresign copied to clipboard

Error: Certificate expired

Open Bolli84 opened this issue 2 years ago • 2 comments

Creating a document for signature, for a particular user it is not possible to sign and I get the error: Certificate expired

When a request for the signature is started (either by me, or by someone else), the procedure is working normal. Once a particulart user wants to sign it, the user gets the pp-up "Internal error. contact admin" The other users can sign well.

The following output is in the nextcloud log:

[{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/vendor/jsignpdf/jsignpdf-php/src/JSignPDF.php","line":29,"function":"sign","class":"Jeidison\JSignPDF\Sign\JSignService","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Handler/JSignPdfHandler.php","line":105,"function":"sign","class":"Jeidison\JSignPDF\JSignPDF","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Handler/JSignPdfHandler.php","line":77,"function":"signUsingVisibleElements","class":"OCA\Libresign\Handler\JSignPdfHandler","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Handler/Pkcs12Handler.php","line":126,"function":"sign","class":"OCA\Libresign\Handler\JSignPdfHandler","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Service/SignFileService.php","line":618,"function":"sign","class":"OCA\Libresign\Handler\Pkcs12Handler","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Controller/SignFileController.php","line":207,"function":"sign","class":"OCA\Libresign\Service\SignFileService","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/apps/libresign/lib/Controller/SignFileController.php","line":180,"function":"sign","class":"OCA\Libresign\Controller\SignFileController","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"signUsingUuid","class":"OCA\Libresign\Controller\SignFileController","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/lib/base.php","line":1058,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/vhosts/SERVER-HOST/SERVER-HOST/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}]

And in addition:

Error | libresign | Certificate expired.

Other users can sign well.

Bolli84 avatar Jun 15 '23 08:06 Bolli84

Hi. This occur when the certificate is expired. I recommend to you to request to this user generate again the certificate redefining the going to LibreSign settings. https://github.com/JSignPdf/jsignpdf-php/blob/fa302ee5333a8643cf49c60ce33189aa86961350/src/Sign/JSignService.php#L142-L147

By default, the duration of a certificate generated by LibreSign is very big, sounds that this user is using a PFX file generated externally from LibreSign. Verify this first and if possible, return here with this information.

The action to reset password only will work if the certificate was generated by LibreSign because at the moment of reset password will generate a new certificate.

If is an external certificate, this user will need to generate a new pfx file outside of LibreSign and put the new certificate file inside LibreSign folder.

I will maintain this issue open because is necessary to cover this scenario with an user case.

Thanks by your report.

vitormattos avatar Jun 15 '23 12:06 vitormattos

Thank you. Resetting the password for this user helped!

Bolli84 avatar Jun 15 '23 14:06 Bolli84

Closing as solved.

PS: If you like this app, don't hesitate to help us to maintain the development sponsoring by GitHub sponsor https://github.com/sponsors/LibreSign or also contacting us to have Enterprise support: https://libresign.coop

vitormattos avatar Apr 24 '24 15:04 vitormattos