From 9e6aac9aa52f748c26c7f01d735eee89cec63ef3 Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Sat, 19 Aug 2017 00:06:43 +0200 Subject: [PATCH] Remove obsolete code --- lib/SimpleSAML/Metadata/Signer.php | 6 +----- modules/adfs/lib/XMLSecurityDSig.php | 30 ---------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 modules/adfs/lib/XMLSecurityDSig.php diff --git a/lib/SimpleSAML/Metadata/Signer.php b/lib/SimpleSAML/Metadata/Signer.php index 5e11918b5..47828f494 100644 --- a/lib/SimpleSAML/Metadata/Signer.php +++ b/lib/SimpleSAML/Metadata/Signer.php @@ -263,11 +263,7 @@ class SimpleSAML_Metadata_Signer $rootNode = $xml->firstChild; // sign the metadata with our private key - if ($type == 'ADFS IdP') { - $objXMLSecDSig = new sspmod_adfs_XMLSecurityDSig($metadataString); - } else { - $objXMLSecDSig = new XMLSecurityDSig(); - } + $objXMLSecDSig = new XMLSecurityDSig(); $objXMLSecDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N); diff --git a/modules/adfs/lib/XMLSecurityDSig.php b/modules/adfs/lib/XMLSecurityDSig.php deleted file mode 100644 index b851a18cd..000000000 --- a/modules/adfs/lib/XMLSecurityDSig.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * This class should be considered a temporary workaround to - * solve the lack of custom formatting in XMLSecurityDSig - * (xmlseclibs). It should be possible to either configure - * the original class to avoid formatting, or to use a custom - * template for the signature. - * - * @todo Move this functionality to xmlseclibs. - * - * @author Daniel Tsosie - * @package SimpleSAMLphp - */ -class sspmod_adfs_XMLSecurityDSig extends XMLSecurityDSig { - - function __construct($metaxml) { - $template = ''; - - if (strpos("\n", $metaxml) === FALSE) { - foreach (explode("\n", self::template) as $line) - $template .= trim($line); - } else { - $template = self::template; - } - - $sigdoc = \SAML2\DOMDocumentFactory::fromString($template); - $this->sigNode = $sigdoc->documentElement; - } -} -- GitLab