7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
16 * @package Zend_InfoCard
17 * @subpackage Zend_InfoCard_Xml_Security
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: EnvelopedSignature.php 16214 2009-06-21 19:34:03Z thomas $
24 * Zend_InfoCard_Xml_Security_Transform_Interface
26 require_once 'Zend/InfoCard/Xml/Security/Transform/Interface.php';
29 * A object implementing the EnvelopedSignature XML Transform
32 * @package Zend_InfoCard
33 * @subpackage Zend_InfoCard_Xml_Security
34 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
35 * @license http://framework.zend.com/license/new-bsd New BSD License
37 class Zend_InfoCard_Xml_Security_Transform_EnvelopedSignature
38 implements Zend_InfoCard_Xml_Security_Transform_Interface
41 * Transforms the XML Document according to the EnvelopedSignature Transform
43 * @throws Zend_InfoCard_Xml_Security_Transform_Exception
44 * @param string $strXMLData The input XML data
45 * @return string the transformed XML data
47 public function transform($strXMLData)
49 $sxe = simplexml_load_string($strXMLData);
51 if(!$sxe->Signature
) {
52 require_once 'Zend/InfoCard/Xml/Security/Transform/Exception.php';
53 throw new Zend_InfoCard_Xml_Security_Transform_Exception("Unable to locate Signature Block for EnvelopedSignature Transform");
56 unset($sxe->Signature
);