Skip to content

Commit 87bc8f9

Browse files
committed
fix(psalm): use fully scoped phpseclib3 namespace for instanceof check
The instanceof check was using the unscoped \phpseclib3\Crypt\Common\PrivateKey but phpseclib is no longer a direct composer dependency on this branch. Use the scoped OCA\Libresign\Vendor\phpseclib3 prefix to match how the class is provided via the 3rdparty scoped vendor bundle. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 42ba8ba commit 87bc8f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Handler/CertificateEngine/AEngineHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ private function loadCaIssuer(string $configPath): \OCA\Libresign\Vendor\phpsecl
833833
$issuer->loadX509($caCert);
834834
$caPrivateKey = \OCA\Libresign\Vendor\phpseclib3\Crypt\PublicKeyLoader::load($caKey);
835835

836-
if (!$caPrivateKey instanceof \phpseclib3\Crypt\Common\PrivateKey) {
836+
if (!$caPrivateKey instanceof \OCA\Libresign\Vendor\phpseclib3\Crypt\Common\PrivateKey) {
837837
$this->logger->error('Loaded key is not a private key', ['keyType' => get_class($caPrivateKey)]);
838838
throw new \RuntimeException('Loaded key is not a private key');
839839
}

0 commit comments

Comments
 (0)