2020use OCA \Libresign \Handler \CertificateEngine \CfsslHandler ;
2121use OCA \Libresign \Handler \CertificateEngine \Handler as CertificateEngineHandler ;
2222use OCA \Libresign \Handler \CertificateEngine \IEngineHandler ;
23- use OCA \Libresign \Handler \JSignPdfHandler ;
2423use OCP \Files \AppData \IAppDataFactory ;
2524use OCP \Files \IAppData ;
2625use OCP \Files \IRootFolder ;
@@ -43,6 +42,7 @@ class InstallService {
4342 public const JAVA_VERSION = 'openjdk version "21.0.6" 2025-01-21 LTS ' ;
4443 private const JAVA_URL_PATH_NAME = '21.0.6+7 ' ;
4544 public const PDFTK_VERSION = '3.3.3 ' ;
45+ public const JSIGNPDF_VERSION = '2.3.0 ' ;
4646 /**
4747 * When update, verify the hash of all architectures
4848 */
@@ -471,19 +471,19 @@ public function installJSignPdf(?bool $async = false): void {
471471 if (!$ this ->appConfig ->getValueString (Application::APP_ID , 'jsignpdf_jar_path ' )) {
472472 $ folder = $ this ->getFolder ($ this ->resource );
473473 $ extractDir = $ this ->getInternalPathOfFolder ($ folder );
474- $ fullPath = $ extractDir . '/jsignpdf- ' . JSignPdfHandler:: VERSION . '/JSignPdf.jar ' ;
474+ $ fullPath = $ extractDir . '/jsignpdf- ' . InstallService:: JSIGNPDF_VERSION . '/JSignPdf.jar ' ;
475475 $ this ->appConfig ->setValueString (Application::APP_ID , 'jsignpdf_jar_path ' , $ fullPath );
476476 }
477477 } else {
478478 $ folder = $ this ->getFolder ($ this ->resource );
479- $ compressedFileName = 'jsignpdf- ' . JSignPdfHandler:: VERSION . '.zip ' ;
479+ $ compressedFileName = 'jsignpdf- ' . InstallService:: JSIGNPDF_VERSION . '.zip ' ;
480480 try {
481481 $ compressedFile = $ folder ->getFile ($ compressedFileName );
482482 } catch (\Throwable $ th ) {
483483 $ compressedFile = $ folder ->newFile ($ compressedFileName );
484484 }
485485 $ comporessedInternalFileName = $ this ->getInternalPathOfFile ($ compressedFile );
486- $ url = 'https://github.com/intoolswetrust/jsignpdf/releases/download/JSignPdf_ ' . str_replace ('. ' , '_ ' , JSignPdfHandler:: VERSION ) . '/jsignpdf- ' . JSignPdfHandler:: VERSION . '.zip ' ;
486+ $ url = 'https://github.com/intoolswetrust/jsignpdf/releases/download/JSignPdf_ ' . str_replace ('. ' , '_ ' , InstallService:: JSIGNPDF_VERSION ) . '/jsignpdf- ' . InstallService:: JSIGNPDF_VERSION . '.zip ' ;
487487 /** WHEN UPDATE version: generate this hash handmade and update here */
488488 $ hash = 'd239658ea50a39eb35169d8392feaffb ' ;
489489
@@ -493,7 +493,7 @@ public function installJSignPdf(?bool $async = false): void {
493493 $ zip = new ZIP ($ extractDir . '/ ' . $ compressedFileName );
494494 $ zip ->extract ($ extractDir );
495495 unlink ($ extractDir . '/ ' . $ compressedFileName );
496- $ fullPath = $ extractDir . '/jsignpdf- ' . JSignPdfHandler:: VERSION . '/JSignPdf.jar ' ;
496+ $ fullPath = $ extractDir . '/jsignpdf- ' . InstallService:: JSIGNPDF_VERSION . '/JSignPdf.jar ' ;
497497 $ this ->appConfig ->setValueString (Application::APP_ID , 'jsignpdf_jar_path ' , $ fullPath );
498498 $ this ->writeAppSignature ();
499499 }
0 commit comments