mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
fix: update to phpseclib3
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
fb7a07dea3
commit
f658fe07fa
1 changed files with 6 additions and 4 deletions
|
|
@ -12,8 +12,9 @@ use Exception;
|
|||
use OC\Core\Command\Base;
|
||||
use OCA\Libresign\Service\Install\InstallService;
|
||||
use OCA\Libresign\Service\Install\SignSetupService;
|
||||
use OCA\Libresign\Vendor\phpseclib\Crypt\RSA;
|
||||
use OCA\Libresign\Vendor\phpseclib\File\X509;
|
||||
use OCA\Libresign\Vendor\phpseclib3\Crypt\RSA;
|
||||
use OCA\Libresign\Vendor\phpseclib3\Exception\NoKeyLoadedException;
|
||||
use OCA\Libresign\Vendor\phpseclib3\File\X509;
|
||||
use OCP\IConfig;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
|
@ -57,8 +58,9 @@ class SignSetup extends Base {
|
|||
return 1;
|
||||
}
|
||||
|
||||
$rsa = new RSA();
|
||||
if ($rsa->loadKey($privateKey) === false) {
|
||||
try {
|
||||
$rsa = RSA::loadPrivateKey($privateKey);
|
||||
} catch (NoKeyLoadedException) {
|
||||
$output->writeln('Invalid private key');
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue