diff --git a/modules/InfoCard/lib/Auth/Source/ICAuth.php b/modules/InfoCard/lib/Auth/Source/ICAuth.php index 47d85f86cb22fef9d14a5cc87a42af66b311da45..214d5ab384b7608313fbf96e216744c4fadf1f0f 100644 --- a/modules/InfoCard/lib/Auth/Source/ICAuth.php +++ b/modules/InfoCard/lib/Auth/Source/ICAuth.php @@ -48,11 +48,12 @@ SimpleSAML_Logger::debug('ENTRA en icauth'); $config = SimpleSAML_Configuration::getInstance(); $autoconfig = $config->copyFromBase('logininfocard', 'config-login-infocard.php'); $idp_key = $autoconfig->getValue('idp_key'); + $idp_pass = $autoconfig->getValue('idp_key_pass', NULL); $sts_crt = $autoconfig->getValue('sts_crt'); $Infocard = $autoconfig->getValue('InfoCard'); $infocard = new sspmod_InfoCard_RP_InfoCard(); - $infocard->addIDPKey($idp_key); + $infocard->addIDPKey($idp_key, $idp_key_pass); $infocard->addSTSCertificate($sts_crt); if (!$xmlToken) SimpleSAML_Logger::debug("XMLtoken: ".$xmlToken); diff --git a/modules/InfoCard/lib/RP/InfoCard.php b/modules/InfoCard/lib/RP/InfoCard.php index 254c3013908da7e6adf2562739a4eabd8b6ea88f..8cc7fb80012c27f0cc4f5d68989b40864cd5d661 100644 --- a/modules/InfoCard/lib/RP/InfoCard.php +++ b/modules/InfoCard/lib/RP/InfoCard.php @@ -120,10 +120,10 @@ SimpleSAML_Logger::debug('IC: secureToken'); catch(Exception $e) { SimpleSAML_Logger::debug('ProcSecToken '.$e); $retval->setError('Failed to extract assertion document'); - throw new Exception('Failed to extract assertion document'); + throw new Exception('Failed to extract assertion document: ' . $e->getMessage()); $retval->setCode(Zend_InfoCard_Claims::RESULT_PROCESSING_FAILURE); return $retval; - } + } try { $assertions = self::getAssertions($decryptedToken);