import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -17,7 +17,7 @@
* @subpackage Zend_InfoCard_Cipher
* @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: Rsa.php 9094 2008-03-30 18:36:55Z thomas $
* @version $Id: Rsa.php 13522 2009-01-06 16:35:55Z thomas $
*/
/**
@ -55,6 +55,7 @@ class Zend_InfoCard_Cipher_Pki_Adapter_Rsa
// Can't test this..
// @codeCoverageIgnoreStart
if(!extension_loaded('openssl')) {
require_once 'Zend/InfoCard/Cipher/Exception.php';
throw new Zend_InfoCard_Cipher_Exception("Use of this PKI RSA Adapter requires the openssl extension loaded");
}
// @codeCoverageIgnoreEnd
@ -77,10 +78,11 @@ class Zend_InfoCard_Cipher_Pki_Adapter_Rsa
$private_key = openssl_pkey_get_private(array($privateKey, $password));
if(!$private_key) {
require_once 'Zend/InfoCard/Cipher/Exception.php';
throw new Zend_InfoCard_Cipher_Exception("Failed to load private key");
}
if(!is_null($padding)) {
if($padding !== null) {
try {
$this->setPadding($padding);
} catch(Exception $e) {
@ -103,6 +105,7 @@ class Zend_InfoCard_Cipher_Pki_Adapter_Rsa
openssl_free_key($private_key);
if(!$result) {
require_once 'Zend/InfoCard/Cipher/Exception.php';
throw new Zend_InfoCard_Cipher_Exception("Unable to Decrypt Value using provided private key");
}