Ejemplo n.º 1
0
 /**
  * Sets the InfoCard public key cipher object to use
  *
  * @param  Zend_InfoCard_Cipher_PKI_Interface $cipherObj
  * @return Zend_Auth_Adapter_InfoCard Provides a fluent interface
  */
 public function setPKICipherObject(Zend_InfoCard_Cipher_PKI_Interface $cipherObj)
 {
     $this->_infoCard->setPKICipherObject($cipherObj);
     return $this;
 }
Ejemplo n.º 2
0
    public function testPlugins() 
    {
		$adapter  = new _Zend_InfoCard_Test_Adapter();
		$infoCard = new Zend_InfoCard();
		
		$infoCard->setAdapter($adapter);

		$result = $infoCard->getAdapter() instanceof Zend_InfoCard_Adapter_Interface;
		
		$this->assertTrue($result);
		$this->assertTrue($infoCard->getAdapter() instanceof _Zend_InfoCard_Test_Adapter);
				
		$infoCard->addCertificatePair($this->sslPrvKey, $this->sslPubKey);
		
		$claims = $infoCard->process($this->_xmlDocument);

		$pki_object = new Zend_InfoCard_Cipher_PKI_Adapter_RSA(Zend_InfoCard_Cipher_PKI_Adapter_Abstract::NO_PADDING);
		
		$infoCard->setPKICipherObject($pki_object);
		
		$this->assertTrue($pki_object === $infoCard->getPKICipherObject());
		
		$sym_object = new Zend_InfoCard_Cipher_Symmetric_Adapter_AES256CBC();
		
		$infoCard->setSymCipherObject($sym_object);
		
		$this->assertTrue($sym_object === $infoCard->getSymCipherObject());
	}