@@ -37,11 +37,7 @@ public function __construct(
3737 $ this ->loadLibreSignCaCertificate ();
3838 }
3939
40- /**
41- * Load LibreSign CA certificate and set it as trusted root.
42- */
4340 private function loadLibreSignCaCertificate (): void {
44- // Try to load from config path first
4541 $ configPath = $ this ->appConfig ->getValueString (Application::APP_ID , 'config_path ' );
4642 if (!empty ($ configPath ) && is_dir ($ configPath )) {
4743 $ caPemPath = $ configPath . DIRECTORY_SEPARATOR . 'ca.pem ' ;
@@ -55,7 +51,6 @@ private function loadLibreSignCaCertificate(): void {
5551 }
5652 }
5753
58- // Try alternate location
5954 $ alternateConfig = $ this ->appConfig ->getValueString (
6055 Application::APP_ID ,
6156 'libresign_ca_certificate '
@@ -66,18 +61,10 @@ private function loadLibreSignCaCertificate(): void {
6661 }
6762 }
6863
69- /**
70- * Add additional trusted root certificate.
71- */
7264 public function addTrustedRoot (string $ certificatePem ): void {
7365 $ this ->validator ->addTrustedRoot ($ certificatePem );
7466 }
7567
76- /**
77- * Set multiple trusted root certificates.
78- *
79- * @param list<string> $certificates
80- */
8168 public function setTrustedRoots (array $ certificates ): void {
8269 $ this ->validator ->setTrustedRoots ($ certificates );
8370 }
@@ -153,9 +140,6 @@ private function mapValidationResults(array $results, ?DateTime $signatureTime =
153140 return $ mapped ;
154141 }
155142
156- /**
157- * Map signature validation result to LibreSign format.
158- */
159143 private function mapSignatureValidation (ValidationResult $ result ): array {
160144 return match ($ result ->state ) {
161145 ValidationState::SIGNATURE_VALID => [
@@ -195,9 +179,6 @@ private function mapSignatureValidation(ValidationResult $result): array {
195179 };
196180 }
197181
198- /**
199- * Map certificate validation result to LibreSign format.
200- */
201182 private function mapCertificateValidation (ValidationResult $ result ): array {
202183 return match ($ result ->state ) {
203184 ValidationState::CERT_TRUSTED => [
0 commit comments