Skip to content

Commit

Permalink
CS adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Dec 4, 2024
1 parent 83978e6 commit fc5b4b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Unit/File/X509/X509Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1418,15 +1418,15 @@ public function testRSACertWithECSDASig()
-----END PRIVATE KEY-----');
$CAPubKey = $CAPrivKey->getPublicKey();

$CASubject = new X509;
$CASubject = new X509();
$CASubject->setDNProp('id-at-organizationName', 'phpseclib CA cert');
$CASubject->setPublicKey($CAPubKey);

$CAIssuer = new X509;
$CAIssuer = new X509();
$CAIssuer->setPrivateKey($CAPrivKey);
$CAIssuer->setDN($CASubject->getDN());

$x509 = new X509;
$x509 = new X509();
$x509->setEndDate('lifetime');
$x509->makeCA();
$result = $x509->sign($CAIssuer, $CASubject);
Expand Down Expand Up @@ -1463,16 +1463,16 @@ public function testRSACertWithECSDASig()
$privKey = $privKey->withPadding(RSA::SIGNATURE_PKCS1);
$pubKey = $privKey->getPublicKey();

$subject = new X509;
$subject = new X509();
$subject->setDomain('whatever.com');
$subject->setPublicKey($pubKey);

$x509 = new X509;
$x509 = new X509();
$x509->setEndDate('lifetime');
$result = $x509->sign($CAIssuer, $subject);
$cert = $x509->saveX509($result);

$x509 = new X509;
$x509 = new X509();
$cert = $x509->loadX509($cert);

$this->assertFalse(isset($cert['signatureAlgorithm']['parameters']));
Expand Down

0 comments on commit fc5b4b3

Please sign in to comment.