import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -17,14 +17,9 @@
|
||||
* @subpackage Zend_InfoCard_Xml_Security
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Transform.php 9094 2008-03-30 18:36:55Z thomas $
|
||||
* @version $Id: Transform.php 15577 2009-05-14 12:43:34Z matthew $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Loader
|
||||
*/
|
||||
require_once 'Zend/Loader.php';
|
||||
|
||||
/**
|
||||
* A class to create a transform rule set based on XML URIs and then apply those rules
|
||||
* in the correct order to a given XML input
|
||||
@ -59,6 +54,7 @@ class Zend_InfoCard_Xml_Security_Transform
|
||||
case 'http://www.w3.org/2001/10/xml-exc-c14n#':
|
||||
return 'Zend_InfoCard_Xml_Security_Transform_XmlExcC14N';
|
||||
default:
|
||||
require_once 'Zend/InfoCard/Xml/Security/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Exception("Unknown or Unsupported Transformation Requested");
|
||||
}
|
||||
}
|
||||
@ -97,13 +93,17 @@ class Zend_InfoCard_Xml_Security_Transform
|
||||
public function applyTransforms($strXmlDocument)
|
||||
{
|
||||
foreach($this->_transformList as $transform) {
|
||||
Zend_Loader::loadClass($transform['class']);
|
||||
if (!class_exists($transform['class'])) {
|
||||
require_once 'Zend/Loader.php';
|
||||
Zend_Loader::loadClass($transform['class']);
|
||||
}
|
||||
|
||||
$transformer = new $transform['class'];
|
||||
|
||||
// We can't really test this check because it would require logic changes in the component itself
|
||||
// @codeCoverageIgnoreStart
|
||||
if(!($transformer instanceof Zend_InfoCard_Xml_Security_Transform_Interface)) {
|
||||
require_once 'Zend/InfoCard/Xml/Security/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Exception("Transforms must implement the Transform Interface");
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_InfoCard_Xml_Security
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: EnvelopedSignature.php 9094 2008-03-30 18:36:55Z thomas $
|
||||
* @version $Id: EnvelopedSignature.php 13213 2008-12-14 11:05:07Z thomas $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,11 +25,6 @@
|
||||
*/
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Interface.php';
|
||||
|
||||
/**
|
||||
* Zend_InfoCard_Xml_Security_Transform_Exception
|
||||
*/
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Exception.php';
|
||||
|
||||
/**
|
||||
* A object implementing the EnvelopedSignature XML Transform
|
||||
*
|
||||
@ -54,6 +49,7 @@ class Zend_InfoCard_Xml_Security_Transform_EnvelopedSignature
|
||||
$sxe = simplexml_load_string($strXMLData);
|
||||
|
||||
if(!$sxe->Signature) {
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Transform_Exception("Unable to locate Signature Block for EnvelopedSignature Transform");
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Zend_InfoCard_Xml_Security
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: XmlExcC14N.php 9094 2008-03-30 18:36:55Z thomas $
|
||||
* @version $Id: XmlExcC14N.php 13213 2008-12-14 11:05:07Z thomas $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,11 +25,6 @@
|
||||
*/
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Interface.php';
|
||||
|
||||
/**
|
||||
* Zend_InfoCard_Xml_Security_Transform_Exception
|
||||
*/
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Exception.php';
|
||||
|
||||
/**
|
||||
* A Transform to perform C14n XML Exclusive Canonicalization
|
||||
*
|
||||
@ -58,6 +53,7 @@ class Zend_InfoCard_Xml_Security_Transform_XmlExcC14N
|
||||
return $dom->C14N(true, false);
|
||||
}
|
||||
|
||||
require_once 'Zend/InfoCard/Xml/Security/Transform/Exception.php';
|
||||
throw new Zend_InfoCard_Xml_Security_Transform_Exception("This transform requires the C14N() method to exist in the DOM extension");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user