CS adjustments

This commit is contained in:
terrafrost 2023-03-04 23:48:43 -06:00
parent 60358cefb1
commit 79dead6a5e
7 changed files with 4 additions and 8 deletions

View File

@ -629,8 +629,10 @@ abstract class PKCS8 extends PKCS
/** /**
* Perform some preliminary parsing of the key * Perform some preliminary parsing of the key
*
* @param string|array $key
*/ */
private static function preParse(string &$key): array private static function preParse(&$key): array
{ {
self::initialize_static_variables(); self::initialize_static_variables();

View File

@ -23,7 +23,6 @@ namespace phpseclib3\Crypt\DH\Formats\Keys;
use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor; use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
use phpseclib3\Exception\RuntimeException; use phpseclib3\Exception\RuntimeException;
use phpseclib3\Exception\UnexpectedValueException;
use phpseclib3\File\ASN1; use phpseclib3\File\ASN1;
use phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1\Maps;
use phpseclib3\Math\BigInteger; use phpseclib3\Math\BigInteger;

View File

@ -27,7 +27,6 @@ namespace phpseclib3\Crypt\DSA\Formats\Keys;
use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor; use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
use phpseclib3\Exception\RuntimeException; use phpseclib3\Exception\RuntimeException;
use phpseclib3\Exception\UnexpectedValueException;
use phpseclib3\File\ASN1; use phpseclib3\File\ASN1;
use phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1\Maps;
use phpseclib3\Math\BigInteger; use phpseclib3\Math\BigInteger;

View File

@ -32,7 +32,6 @@ use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve;
use phpseclib3\Crypt\EC\Curves\Ed25519; use phpseclib3\Crypt\EC\Curves\Ed25519;
use phpseclib3\Crypt\EC\Curves\Ed448; use phpseclib3\Crypt\EC\Curves\Ed448;
use phpseclib3\Exception\RuntimeException; use phpseclib3\Exception\RuntimeException;
use phpseclib3\Exception\UnexpectedValueException;
use phpseclib3\Exception\UnsupportedCurveException; use phpseclib3\Exception\UnsupportedCurveException;
use phpseclib3\File\ASN1; use phpseclib3\File\ASN1;
use phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1\Maps;

View File

@ -28,7 +28,6 @@ declare(strict_types=1);
namespace phpseclib3\Crypt\RSA\Formats\Keys; namespace phpseclib3\Crypt\RSA\Formats\Keys;
use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor; use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
use phpseclib3\Exception\UnexpectedValueException;
use phpseclib3\File\ASN1; use phpseclib3\File\ASN1;
use phpseclib3\Math\BigInteger; use phpseclib3\Math\BigInteger;

View File

@ -2376,8 +2376,6 @@ class SSH2
/** /**
* Return the currently configured timeout * Return the currently configured timeout
*
* @return int
*/ */
public function getTimeout(): int public function getTimeout(): int
{ {

View File

@ -674,7 +674,7 @@ MIIEDwIBADATBgcqhkjOPQIBBggqhkjOPQMBBwSCA/MwggPvAgEBBIID6P//////
$this->assertTrue($key->verify($plaintext, $sig)); $this->assertTrue($key->verify($plaintext, $sig));
} }
public function testNakedPKCS8PubKey() public function testNakedPKCS8PubKey(): void
{ {
$key = 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErPJyxEu2/oKCrJaaTVTrq39DKJ2XcN6W+k8UvGf+Y/lDWNbFitQocabsDUvSN0edHH3UKP5QPTz4cOlyIPMrXQ=='; $key = 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErPJyxEu2/oKCrJaaTVTrq39DKJ2XcN6W+k8UvGf+Y/lDWNbFitQocabsDUvSN0edHH3UKP5QPTz4cOlyIPMrXQ==';
$key = PublicKeyLoader::load($key); $key = PublicKeyLoader::load($key);