From 8743bd4ed90965f7c5abb5c932caecfc64c68a72 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Tue, 13 Sep 2022 12:05:13 +0200 Subject: [PATCH] Fix tests --- tests/modules/admin/src/Controller/FederationTest.php | 4 ++-- tests/modules/saml/src/Auth/Source/SPTest.php | 8 ++++---- tests/modules/saml/src/Controller/MetadataTest.php | 4 ++-- tests/modules/saml/src/IdP/SAML2Test.php | 4 ++-- tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/modules/admin/src/Controller/FederationTest.php b/tests/modules/admin/src/Controller/FederationTest.php index 416d4dae2..3a600e1c1 100644 --- a/tests/modules/admin/src/Controller/FederationTest.php +++ b/tests/modules/admin/src/Controller/FederationTest.php @@ -36,10 +36,10 @@ class FederationTest extends TestCase private const LIBRARY = 'vendor/simplesamlphp/saml2/tests/resources'; /** @var string */ - public const CERT_KEY = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.key'; + public const CERT_KEY = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.key'; /** @var string */ - public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.crt'; + public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.crt'; /** @var \SimpleSAML\Configuration */ protected Configuration $config; diff --git a/tests/modules/saml/src/Auth/Source/SPTest.php b/tests/modules/saml/src/Auth/Source/SPTest.php index cbb804c9d..3dfc5a2cf 100644 --- a/tests/modules/saml/src/Auth/Source/SPTest.php +++ b/tests/modules/saml/src/Auth/Source/SPTest.php @@ -31,16 +31,16 @@ class SPTest extends ClearStateTestCase private const SECURITY = 'vendor/simplesamlphp/xml-security/tests/resources'; /** @var string */ - public const CERT_KEY = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.key'; + public const CERT_KEY = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.key'; /** @var string */ - public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.crt'; + public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.crt'; /** @var string */ - public const CERT_OTHER_KEY = '../' . self::SECURITY . '/certificates/rsa-pem/other.simplesamlphp.org.key'; + public const CERT_OTHER_KEY = '../' . self::SECURITY . '/certificates/other.simplesamlphp.org.key'; /** @var string */ - public const CERT_OTHER_PUBLIC = '../' . self::SECURITY . '/certificates/rsa-pem/other.simplesamlphp.org.crt'; + public const CERT_OTHER_PUBLIC = '../' . self::SECURITY . '/certificates/other.simplesamlphp.org.crt'; /** @var \SimpleSAML\Configuration|null $idpMetadata */ private ?Configuration $idpMetadata = null; diff --git a/tests/modules/saml/src/Controller/MetadataTest.php b/tests/modules/saml/src/Controller/MetadataTest.php index f106822b5..c18d51aed 100644 --- a/tests/modules/saml/src/Controller/MetadataTest.php +++ b/tests/modules/saml/src/Controller/MetadataTest.php @@ -45,10 +45,10 @@ class MetadataTest extends TestCase private const XMLSEC = '../vendor/simplesamlphp/xml-security/tests/resources'; /** @var string */ - public const CERT_KEY = self::XMLSEC . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.key'; + public const CERT_KEY = self::XMLSEC . '/certificates/selfsigned.simplesamlphp.org.key'; /** @var string */ - public const CERT_PUBLIC = self::XMLSEC . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.crt'; + public const CERT_PUBLIC = self::XMLSEC . '/certificates/selfsigned.simplesamlphp.org.crt'; private array $idps; diff --git a/tests/modules/saml/src/IdP/SAML2Test.php b/tests/modules/saml/src/IdP/SAML2Test.php index 20b1f8094..2f7b07da2 100644 --- a/tests/modules/saml/src/IdP/SAML2Test.php +++ b/tests/modules/saml/src/IdP/SAML2Test.php @@ -23,10 +23,10 @@ class SAML2Test extends ClearStateTestCase private const SECURITY = 'vendor/simplesamlphp/xml-security/tests/resources'; /** @var string */ - public const CERT_KEY = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.key'; + public const CERT_KEY = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.key'; /** @var string */ - public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.crt'; + public const CERT_PUBLIC = '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.crt'; /** * Default values for the state array expected to be generated at the start of logins diff --git a/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php b/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php index c1602295a..d636f50b8 100644 --- a/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php +++ b/tests/src/SimpleSAML/Metadata/SAMLBuilderTest.php @@ -397,8 +397,8 @@ class SAMLBuilderTest extends TestCase $info = ['AuthId' => 'default-sp']; $metadata = [ 'entityID' => 'urn:x-simplesamlphp:example-sp', - 'certificate' => '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.crt', - 'privatekey' => '../' . self::SECURITY . '/certificates/rsa-pem/selfsigned.simplesamlphp.org.key', + 'certificate' => '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.crt', + 'privatekey' => '../' . self::SECURITY . '/certificates/selfsigned.simplesamlphp.org.key', ]; // Without a key name, it should have KeyDescriptors but no KeyNames. @@ -426,8 +426,8 @@ class SAMLBuilderTest extends TestCase $this->assertEquals('my-key-name', $keyNames->item(1)->textContent); // Add rollover configuration. - $metadata['new_certificate'] = '../' . self::SECURITY . '/certificates/rsa-pem/other.simplesamlphp.org.crt'; - $metadata['new_privatekey'] = '../' . self::SECURITY . '/certificates/rsa-pem/other.simplesamlphp.org.key'; + $metadata['new_certificate'] = '../' . self::SECURITY . '/certificates/other.simplesamlphp.org.crt'; + $metadata['new_privatekey'] = '../' . self::SECURITY . '/certificates/other.simplesamlphp.org.key'; $metadata['new_key_name'] = 'my-new-key-name'; // It should now have 3 KeyNames. -- GitLab