mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 21:12:16 +01:00
fix: namespace
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
d93fe5da36
commit
fbef120cc7
1 changed files with 7 additions and 7 deletions
|
|
@ -837,11 +837,11 @@ abstract class AEngineHandler implements IEngineHandler {
|
|||
throw new \RuntimeException('Failed to read CA certificate or private key');
|
||||
}
|
||||
|
||||
$issuer = new \phpseclib\File\X509();
|
||||
$issuer = new \phpseclib3\File\X509();
|
||||
$issuer->loadX509($caCert);
|
||||
$caPrivateKey = \phpseclib\Crypt\PublicKeyLoader::load($caKey);
|
||||
$caPrivateKey = \phpseclib3\Crypt\PublicKeyLoader::load($caKey);
|
||||
|
||||
if (!$caPrivateKey instanceof \phpseclib\Crypt\Common\PrivateKey) {
|
||||
if (!$caPrivateKey instanceof \phpseclib3\Crypt\Common\PrivateKey) {
|
||||
throw new \RuntimeException('Loaded key is not a private key');
|
||||
}
|
||||
|
||||
|
|
@ -854,7 +854,7 @@ abstract class AEngineHandler implements IEngineHandler {
|
|||
$revokedList = [];
|
||||
foreach ($revokedCertificates as $cert) {
|
||||
$revokedList[] = [
|
||||
'userCertificate' => new \phpseclib\Math\BigInteger($cert->getSerialNumber(), 16),
|
||||
'userCertificate' => new \phpseclib3\Math\BigInteger($cert->getSerialNumber(), 16),
|
||||
'revocationDate' => ['utcTime' => $cert->getRevokedAt()->format('D, d M Y H:i:s O')],
|
||||
];
|
||||
}
|
||||
|
|
@ -863,7 +863,7 @@ abstract class AEngineHandler implements IEngineHandler {
|
|||
'tbsCertList' => [
|
||||
'version' => 'v2',
|
||||
'signature' => ['algorithm' => 'sha256WithRSAEncryption'],
|
||||
'issuer' => $issuer->getSubjectDN(\phpseclib\File\X509::DN_ARRAY),
|
||||
'issuer' => $issuer->getSubjectDN(\phpseclib3\File\X509::DN_ARRAY),
|
||||
'thisUpdate' => ['utcTime' => $now],
|
||||
'nextUpdate' => ['utcTime' => $nextWeek],
|
||||
'revokedCertificates' => $revokedList,
|
||||
|
|
@ -871,7 +871,7 @@ abstract class AEngineHandler implements IEngineHandler {
|
|||
'signatureAlgorithm' => ['algorithm' => 'sha256WithRSAEncryption'],
|
||||
];
|
||||
|
||||
$crl = new \phpseclib\File\X509();
|
||||
$crl = new \phpseclib3\File\X509();
|
||||
$crl->loadCRL($crlStructure);
|
||||
$crl->setSerialNumber((string)$crlNumber);
|
||||
$crl->setStartDate(new \DateTime('-1 minute'));
|
||||
|
|
@ -887,7 +887,7 @@ abstract class AEngineHandler implements IEngineHandler {
|
|||
$signedCrl['signatureAlgorithm'] = ['algorithm' => 'sha256WithRSAEncryption'];
|
||||
}
|
||||
|
||||
$crlDerData = $crl->saveCRL($signedCrl, \phpseclib\File\X509::FORMAT_DER);
|
||||
$crlDerData = $crl->saveCRL($signedCrl, \phpseclib3\File\X509::FORMAT_DER);
|
||||
|
||||
if ($crlDerData === false) {
|
||||
throw new \RuntimeException('Failed to save CRL in DER format');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue