|
41 | 41 | class InstallService { |
42 | 42 | public const JAVA_VERSION = 'openjdk version "21.0.6" 2025-01-21 LTS'; |
43 | 43 | private const JAVA_URL_PATH_NAME = '21.0.6+7'; |
44 | | - public const PDFTK_VERSION = '3.3.3'; |
45 | | - public const JSIGNPDF_VERSION = '2.3.0'; |
46 | | - /** |
47 | | - * When update, verify the hash of all architectures |
48 | | - */ |
| 44 | + public const PDFTK_VERSION = '3.3.3'; /** @todo When update, verify the hash **/ |
| 45 | + private const PDFTK_HASH = '59a28bed53b428595d165d52988bf4cf'; |
| 46 | + public const JSIGNPDF_VERSION = '2.3.0'; /** @todo When update, verify the hash **/ |
| 47 | + private const JSIGNPDF_HASH = 'd239658ea50a39eb35169d8392feaffb'; |
49 | 48 | public const CFSSL_VERSION = '1.6.5'; |
| 49 | + |
50 | 50 | private ICache $cache; |
51 | 51 | private ?OutputInterface $output = null; |
52 | 52 | private string $resource = ''; |
@@ -484,10 +484,8 @@ public function installJSignPdf(?bool $async = false): void { |
484 | 484 | } |
485 | 485 | $comporessedInternalFileName = $this->getInternalPathOfFile($compressedFile); |
486 | 486 | $url = 'https://github.com/intoolswetrust/jsignpdf/releases/download/JSignPdf_' . str_replace('.', '_', InstallService::JSIGNPDF_VERSION) . '/jsignpdf-' . InstallService::JSIGNPDF_VERSION . '.zip'; |
487 | | - /** WHEN UPDATE version: generate this hash handmade and update here */ |
488 | | - $hash = 'd239658ea50a39eb35169d8392feaffb'; |
489 | 487 |
|
490 | | - $this->download($url, 'JSignPdf', $comporessedInternalFileName, $hash); |
| 488 | + $this->download($url, 'JSignPdf', $comporessedInternalFileName, self::JSIGNPDF_HASH); |
491 | 489 |
|
492 | 490 | $extractDir = $this->getInternalPathOfFolder($folder); |
493 | 491 | $zip = new ZIP($extractDir . '/' . $compressedFileName); |
@@ -539,10 +537,8 @@ public function installPdftk(?bool $async = false): void { |
539 | 537 | } |
540 | 538 | $fullPath = $this->getInternalPathOfFile($file); |
541 | 539 | $url = 'https://gitlab.com/api/v4/projects/5024297/packages/generic/pdftk-java/v' . self::PDFTK_VERSION . '/pdftk-all.jar'; |
542 | | - /** @todo WHEN UPDATE version: generate this hash handmade and update here */ |
543 | | - $hash = '59a28bed53b428595d165d52988bf4cf'; |
544 | 540 |
|
545 | | - $this->download($url, 'pdftk', $fullPath, $hash); |
| 541 | + $this->download($url, 'pdftk', $fullPath, self::PDFTK_HASH); |
546 | 542 | $this->appConfig->setValueString(Application::APP_ID, 'pdftk_path', $fullPath); |
547 | 543 | $this->writeAppSignature(); |
548 | 544 | } |
|
0 commit comments