protected $_address = null;
/**
- * Cache for inline data.
+ * Cached data.
*
* @var array
*/
- static protected $_inlinecache = array();
+ static protected $_cache = array();
/**
* Return the full rendered version of the Horde_Mime_Part object.
*/
protected function _renderInline()
{
+ $id = $this->_mimepart->getMimeId();
+
if (empty($this->_imppgp) &&
!empty($GLOBALS['conf']['gnupg']['path'])) {
$this->_imppgp = Horde_Crypt::singleton(array('IMP', 'Pgp'));
if (Horde_Util::getFormData('rawpgpkey')) {
return array(
- $this->_mimepart->getMimeId() => array(
+ $id => array(
'data' => $this->_mimepart->getContents(),
'status' => array(),
'type' => 'text/plain; charset=' . $this->_mimepart->getCharset()
return $this->_outputPGPSigned();
case 'multipart/encrypted':
- return $this->_outputPGPEncrypted();
+ if (isset(self::$_cache[$id])) {
+ return array_merge(array(
+ $id => array(
+ 'data' => null,
+ 'status' => self::$_cache[$id]['status'],
+ 'type' => 'text/plain; charset=' . Horde_Nls::getCharset(),
+ 'wrap' => self::$_cache[$id]['wrap']
+ )
+ ), self::$_cache[$id]['other']);
+ }
+ // Fall-through
case 'application/pgp-encrypted':
case 'application/pgp-signature':
}
/**
- * If this MIME part can contain embedded MIME parts, and those embedded
- * MIME parts exist, return an altered version of the Horde_Mime_Part that
- * contains the embedded MIME part information.
+ * If this MIME part can contain embedded MIME part(s), and those part(s)
+ * exist, return a representation of that data.
*
- * @return mixed An array with MIME IDs as the keys and Horde_Mime_Part
- * objects as the parts to replace the current value of
- * the given MIME ID.
- * Returns null if no embedded MIME parts exist.
+ * @return mixed A Horde_Mime_Part object representing the embedded data.
+ * Returns null if no embedded MIME part(s) exist.
*/
protected function _getEmbeddedMimeParts()
{
$version_id = next($partlist);
$data_id = Horde_Mime::mimeIdArithmetic($version_id, 'next');
- /* Initialize inline data. */
- $resymmetric = isset(self::$_inlinecache[$base_id]);
- self::$_inlinecache[$base_id] = array(
- $base_id => array(
- 'data' => '',
- 'status' => array(
- array(
- 'icon' => Horde::img('mime/encryption.png', 'PGP'),
- 'text' => $resymmetric ? self::$_inlinecache[$base_id][$base_id]['status'][0]['text'] : array()
- )
- ),
- 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
+ self::$_cache[$base_id] = array(
+ 'status' => array(
+ array(
+ 'icon' => Horde::img('mime/encryption.png', 'PGP'),
+ 'text' => array()
+ )
+ ),
+ 'other' => array(
+ $version_id => null,
+ $data_id => null
),
- $version_id => null,
- $data_id => null
+ 'wrap' => ''
);
- $status = &self::$_inlinecache[$base_id][$base_id]['status'][0]['text'];
+ $status = &self::$_cache[$base_id]['status'][0]['text'];
/* Is PGP active? */
if (empty($GLOBALS['conf']['gnupg']['path']) ||
!$GLOBALS['prefs']->getValue('use_pgp')) {
- $status[] = _("The message below has been encrypted via PGP, however, PGP support is disabled so the message cannot be decrypted.");
+ $status[] = _("The data in this part has been encrypted via PGP, however, PGP support is disabled so the message cannot be decrypted.");
return null;
}
if (is_null($symmetric_pass)) {
$js_action = '';
- if (!$resymmetric) {
- $status[] = _("The message has been encrypted via PGP.");
- }
+ $status[] = _("The data in this part has been encrypted via PGP.");
switch ($_SESSION['imp']['view']) {
case 'dimp':
}
} catch (Horde_Exception $e) {
Horde::logMessage($e, __FILE__, __LINE__);
- unset(self::$_inlinecache[$base_id]);
return null;
}
$info = $this->_imppgp->pgpPacketInformation($encrypted_data);
} catch (Horde_Exception $e) {
Horde::logMessage($e, __FILE__, __LINE__);
- unset(self::$_inlinecache[$base_id]);
return null;
}
- $literal = !empty($info['literal']);
+ $literal = !empty($info['literal']);
if ($literal) {
- $status[] = _("The message below has been compressed via PGP.");
+ $status[] = _("The data in this part has been compressed via PGP.");
} else {
- $status[] = _("The message below has been encrypted via PGP.");
+ $status[] = _("The data in this part has been encrypted via PGP.");
if (!$symmetric) {
if (!$this->_imppgp->getPersonalPrivateKey()) {
/* Output if there is no personal private key to decrypt
* with. */
- $status[] = _("The message below has been encrypted via PGP, however, no personal private key exists so the message cannot be decrypted.");
+ $status[] = _("The data in this part has been encrypted via PGP, however, no personal private key exists so the message cannot be decrypted.");
return null;
} else {
$personal_pass = $this->_imppgp->getPassphrase('personal');
if (is_null($personal_pass)) {
$js_action = '';
- $status[] = _("The message has been encrypted via PGP.");
+ $status[] = _("The data in this part has been encrypted via PGP.");
switch ($_SESSION['imp']['view']) {
case 'dimp':
$decrypted_data = $this->_imppgp->decryptMessage($encrypted_data, 'literal');
}
} catch (Horde_Exception $e) {
- $status[] = _("The message below does not appear to be a valid PGP encrypted message. Error: ") . $e->getMessage();
+ $status[] = _("The data in this part does not appear to be a valid PGP encrypted message. Error: ") . $e->getMessage();
if (!is_null($symmetric_pass)) {
$this->_imppgp->unsetPassphrase('symmetric', $this->_getSymmetricID());
return $this->_getEmbeddedMimeParts();
return null;
}
- unset(self::$_inlinecache[$base_id][$data_id]);
-
- $msg = Horde_Mime_Part::parseMessage($decrypted_data->message);
- $msg->buildMimeIds($data_id);
+ self::$_cache[$base_id]['wrap'] = 'mimePartWrapValid';
- return array($data_id => $msg);
+ return Horde_Mime_Part::parseMessage($decrypted_data->message, array('forcemime' => true));
}
/**
'text' => array()
)
),
- 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
+ 'type' => 'text/html; charset=' . Horde_Nls::getCharset(),
+ 'wrap' => 'mimePartWrap'
),
$sig_id => null
);
empty($GLOBALS['conf']['gnupg']['path'])) {
/* If PGP not active, hide signature data and output status
* information. */
- $status[] = _("The message below has been digitally signed via PGP, but the signature cannot be verified.");
+ $status[] = _("The data in this part has been digitally signed via PGP, but the signature cannot be verified.");
return $ret;
}
- $status[] = _("The message below has been digitally signed via PGP.");
+ $status[] = _("The data in this part has been digitally signed via PGP.");
if ($GLOBALS['prefs']->getValue('pgp_verify') ||
Horde_Util::getFormData('pgp_verify_msg')) {
Horde_Text_Filter::filter($sig_text, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::NOHTML))
)
);
+
+ $ret[$base_id]['wrap'] = $success
+ ? 'mimePartWrapValid'
+ : 'mimePartWrapInvalid';
} else {
switch ($_SESSION['imp']['view']) {
case 'imp':
}
/**
- * Generates HTML output for 'multipart/encrypted' MIME parts.
- *
- * @return string The HTML output.
- */
- protected function _outputPGPEncrypted()
- {
- $id = $this->_mimepart->getMimeId();
- return isset(self::$_inlinecache[$id])
- ? self::$_inlinecache[$id]
- : array();
- }
-
- /**
* Generates the symmetric ID for this message.
*
* @return string Symmetric ID.
/**
* The IMP_Horde_Mime_Viewer_Smime class allows viewing/decrypting of S/MIME
* messages.
- * This class implements parts of RFC 2630, RFC 2632, and RFC 2633.
+ * This class implements RFC 2630, 2632, & 2633.
*
* This class handles the following MIME types:
* application/pkcs7-mime
* application/x-pkcs7-signature (in multipart/signed part)
*
* This class may add the following parameters to the URL:
- * 'smime_verify_msg' - (boolean) Do verification of S.
+ * 'smime_verify_msg' - (boolean) Do verification of S/MIME message.
* 'view_smime_key' - (boolean) Display the S/MIME Key.
*
* Copyright 2002-2009 The Horde Project (http://www.horde.org/)
protected $_impsmime = null;
/**
- * Cache for inline data.
+ * Cached data.
*
* @var array
*/
- static protected $_inlinecache = array();
+ static protected $_cache = array();
+
+ /**
+ * Init the S/MIME Horde_Crypt object.
+ */
+ protected function _initSmime()
+ {
+ if (is_null($this->_impsmime) &&
+ $GLOBALS['prefs']->getValue('use_smime')) {
+ try {
+ $this->_impsmime = Horde_Crypt::singleton(array('IMP', 'Smime'));
+ $this->_impsmime->checkForOpenSSL();
+ } catch (Horde_Exception $e) {
+ $this->_impsmime = null;
+ }
+ }
+ }
/**
* Return the rendered inline version of the Horde_Mime_Part object.
protected function _renderInline()
{
/* Check to see if S/MIME support is available. */
- $this->_initSMIME();
+ $this->_initSmime();
if (Horde_Util::getFormData('view_smime_key')) {
- return $this->_outputSMIMEKey();
+ return $this->_outputSmime();
}
if (is_null($this->_impsmime)) {
Horde::addScriptFile('imp.js', 'imp');
}
+ $id = $this->_mimepart->getMimeId();
+
switch ($this->_mimepart->getType()) {
- case 'multipart/signed':
- return $this->_outputSMIMESigned();
+ case 'multipart/signed';
+ if (!in_array($this->_mimepart->getContentTypeParameter('protocol'), array('application/pkcs7-signature', 'application/x-pkcs7-signature'))) {
+ return array();
+ }
+ $this->_parseSignedData(true);
+ // Fall-through
case 'application/pkcs7-mime':
case 'application/x-pkcs7-mime':
- return $this->_outputSMIMEEncrypted();
+ if (isset(self::$_cache[$id])) {
+ return array(
+ $id => array(
+ 'data' => null,
+ 'status' => self::$_cache[$id]['status'],
+ 'type' => 'text/plain; charset=' . Horde_Nls::getCharset(),
+ 'wrap' => self::$_cache[$id]['wrap']
+ )
+ );
+ }
+ // Fall-through
+
+ default:
+ return array();
}
}
return null;
}
- // 'smime-type' must be empty or 'enveloped-data'
- $smime_type = $this->_mimepart->getContentTypeParameter('smime-type');
- if ($smime_type == 'signed-data') {
- // TODO
+ // 'smime-type' must be 'enveloped-data' or 'signed-data'
+ switch ($this->_mimepart->getContentTypeParameter('smime-type')) {
+ case 'enveloped-data':
+ return $this->_parseEnvelopedData();
+
+ case 'signed-data':
+ return $this->_parseSignedData();
+
+ default:
return null;
}
+ }
+ /**
+ * Parse enveloped (encrypted) data.
+ *
+ * @return mixed See self::_getEmbeddedMimeParts().
+ */
+ protected function _parseEnvelopedData()
+ {
$base_id = $this->_mimepart->getMimeId();
/* Initialize inline data. */
- self::$_inlinecache[$base_id] = array(
- $base_id => array(
- 'data' => '',
- 'status' => array(
- array(
- 'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
- 'text' => array(_("This message has been encrypted via S/MIME."))
- )
- ),
- 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
- )
+ self::$_cache[$base_id] = array(
+ 'status' => array(
+ array(
+ 'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
+ 'text' => array(_("The data in this part has been encrypted via S/MIME."))
+ )
+ ),
+ 'wrap' => ''
);
- $status = &self::$_inlinecache[$base_id][$base_id]['status'][0]['text'];
+ $status = &self::$_cache[$base_id]['status'][0]['text'];
/* Is PGP active? */
- $this->_initSMIME();
+ $this->_initSmime();
if (empty($this->_impsmime)) {
- $status[] = _("S/MIME support is not currently enabled so the message is unable to be decrypted.");
+ $status[] = _("S/MIME support is not currently enabled so the data is unable to be decrypted.");
return null;
}
if (!$this->_impsmime->getPersonalPrivateKey()) {
- $status[] = _("No personal private key exists so the message is unable to be decrypted.");
+ $status[] = _("No personal private key exists so the data is unable to be decrypted.");
return null;
}
/* Make sure we have a passphrase. */
$passphrase = $this->_impsmime->getPassphrase();
- if ($passphrase === false) {
+ if (is_null($passphrase)) {
$js_action = '';
- switch ($_SESSION['imp']['view'] == 'imp') {
+ switch ($_SESSION['imp']['view']) {
case 'dimp':
$js_action = 'DimpCore.reloadMessage({});';
// Fall through
case 'imp':
- $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your S/MIME private key to view this message.") . '</a>';
+ $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your S/MIME private key to view this data.") . '</a>';
break;
}
return null;
return null;
}
- return array($base_id => Horde_Mime_Part::parseMessage($decrypted_data));
- }
-
- /**
- * Generates HTML output for the S/MIME key.
- *
- * @return string The HTML output.
- */
- protected function _outputSMIMEKey()
- {
- if (empty($this->_impsmime)) {
- return array();
- }
-
- $raw_text = $this->_mimepart->getMimeId()
- ? $this->_params['contents']->getBodyPart($this->_mimepart->getMimeId(), array('mimeheaders' => true, 'stream' => true))
- : $this->_params['contents']->fullMessageText();
+ self::$_cache[$base_id]['wrap'] = 'mimePartWrapValid';
- try {
- $sig_result = $this->_impsmime->verifySignature($this->_mimepart->replaceEOL($raw_text, Horde_Mime_Part::RFC_EOL));
- } catch (Horde_Exception $e) {
- return array();
- }
+ $new_part = Horde_Mime_Part::parseMessage($decrypted_data, array('forcemime' => true));
- return array(
- $this->_mimepart->getMimeId() => array(
- 'data' => $this->_impsmime->certToHTML($sig_result->cert),
- 'status' => array(),
- 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
- )
- );
- }
+ $hdrs = $this->_params['contents']->getHeaderOb();
+ $new_part->setMetadata('imp-smime-from', $hdrs->getValue('from'));
- /**
- * Init the S/MIME Horde_Crypt object.
- */
- protected function _initSMIME()
- {
- if (is_null($this->_impsmime) &&
- $GLOBALS['prefs']->getValue('use_smime')) {
- try {
- $this->_impsmime = Horde_Crypt::singleton(array('IMP', 'Smime'));
- $this->_impsmime->checkForOpenSSL();
- } catch (Horde_Exception $e) {
- $this->_impsmime = null;
- }
- }
+ return $new_part;
}
/**
- * Generates HTML output for 'multipart/signed' MIME parts.
+ * Parse signed data.
*
- * @return array TODO
+ * @param boolean $sig_only Only do signature checking?
+ *
+ * @return mixed See self::_getEmbeddedMimeParts().
*/
- protected function _outputSMIMESigned()
+ protected function _parseSignedData($sig_only = false)
{
$partlist = array_keys($this->_mimepart->contentTypeMap());
$base_id = reset($partlist);
$sig_id = Horde_Mime::mimeIdArithmetic(next($partlist), 'next');
+ $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
- $ret = array(
- $base_id => array(
- 'data' => '',
- 'status' => array(
- array(
- 'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
- 'text' => array(_("This message has been digitally signed via S/MIME."))
- )
- ),
- 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
+ /* Initialize inline data. */
+ self::$_cache[$base_id] = array(
+ 'status' => array(
+ array(
+ 'icon' => Horde::img('mime/encryption.png', 'S/MIME'),
+ 'text' => array(_("The data in this part has been digitally signed via S/MIME."))
+ )
),
- $sig_id => null
+ 'wrap' => 'mimePartWrap'
);
- $status = &$ret[$base_id]['status'][0]['text'];
+ $status = &self::$_cache[$base_id]['status'][0]['text'];
if (!$GLOBALS['prefs']->getValue('use_smime')) {
$status[] = _("S/MIME support is not enabled so the digital signature is unable to be verified.");
- return $ret;
+ return null;
+ }
+
+ if ($this->_params['contents']->isEmbedded($base_id)) {
+ $hdrs = new Horde_Mime_Headers();
+ $hdrs->addHeader('From', $this->_mimepart->getMetadata('imp-smime-from'));
+ $stream = $this->_mimepart->toString(array('headers' => $hdrs, 'stream' => true));
+ } else {
+ $stream = $base_id
+ ? $this->_params['contents']->getBodyPart($base_id, array('mimeheaders' => true, 'stream' => true))
+ : $this->_params['contents']->fullMessageText(array('stream' => true));
}
- $stream = $base_id
- ? $this->_params['contents']->getBodyPart($base_id, array('mimeheaders' => true, 'stream' => true))
- : $this->_params['contents']->fullMessageText();
$raw_text = $this->_mimepart->replaceEOL($stream, Horde_Mime_Part::RFC_EOL);
+ $this->_initSmime();
$sig_result = null;
if ($GLOBALS['prefs']->getValue('smime_verify') ||
Horde_Util::getFormData('smime_verify_msg')) {
try {
$sig_result = $this->_impsmime->verifySignature($raw_text);
+ self::$_cache[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+ self::$_cache[$base_id]['wrap'] = 'mimePartWrapValid';
+
+ /* This data has been verified but there was no output from
+ * the S/MIME program. */
+ if (empty($sig_result->result) ||
+ ($sig_result->result === true)) {
+ $email = is_array($sig_result->email)
+ ? implode(', ', $sig_result->email)
+ : $sig_result->email;
+ $status[] = sprintf(_("The data has been verified. Sender: %s."), htmlspecialchars($email));
+ }
+
+ if (!empty($sig_result->cert)) {
+ $cert = $this->_impsmime->parseCert($sig_result->cert);
+ if (isset($cert['certificate']['subject']['CommonName'])) {
+ $subject = $cert['certificate']['subject']['CommonName'];
+ } elseif (isset($cert['certificate']['subject']['Email'])) {
+ $subject = $cert['certificate']['subject']['Email'];
+ } elseif (isset($sig_result->email)) {
+ $subject = $sig_result->email;
+ } elseif (isset($smime_from)) {
+ $subject = $smime_from;
+ } else {
+ $subject = null;
+ }
+
+ if (!empty($subject) &&
+ $GLOBALS['registry']->hasMethod('contacts/addField') &&
+ $GLOBALS['prefs']->getValue('add_source')) {
+ $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, Horde_Nls::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getUid(), $sig_id) . ' return false;') . _("Save in your Address Book") . '</a>';
+ }
+ }
} catch (Horde_Exception $e) {
- $ret[$base_id]['status'][0]['icon'] = ($e->getCode() == 'horde.warning')
+ self::$_cache[$base_id]['status'][0]['icon'] = ($e->getCode() == 'horde.warning')
? Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir)
: Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
+ self::$_cache[$base_id]['wrap'] = 'mimePartWrapInvalid';
$status[] = $e->getMessage();
- return $ret;
}
} else {
switch ($_SESSION['imp']['view']) {
case 'imp':
- $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _("Click HERE to verify the message.") . '</a>';
+ $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _("Click HERE to verify the data.") . '</a>';
break;
case 'dimp':
- $status[] = Horde::link('#', '', 'smimeVerifyMsg') . _("Click HERE to verify the message.") . '</a>';
+ $status[] = Horde::link('#', '', 'smimeVerifyMsg') . _("Click HERE to verify the data.") . '</a>';
break;
}
- return $ret;
+ }
+
+ if ($sig_only) {
+ return;
}
$subpart = $this->_params['contents']->getMIMEPart($sig_id);
- if (!isset($subpart)) {
+ if (empty($subpart)) {
try {
$msg_data = $this->_impsmime->extractSignedContents($raw_text);
- $subpart = Horde_Mime_Part::parseMessage($msg_data);
+ $subpart = Horde_Mime_Part::parseMessage($msg_data, array('forcemime' => true));
} catch (Horde_Exception $e) {
$this->_status[] = $e->getMessage();
- $subpart = $this->_mimepart;
+ return null;
}
}
- $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
-
- $ret[$base_id]['status'][0]['icon'] = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
+ return $subpart;
+ }
- /* This message has been verified but there was no output
- * from the PGP program. */
- if (empty($sig_result->result) || ($sig_result->result === true)) {
- $email = (is_array($sig_result->email))
- ? implode(', ', $sig_result->email)
- : $sig_result->email;
- $status[] = sprintf(_("The message has been verified. Sender: %s."), htmlspecialchars($email));
+ /**
+ * Generates HTML output for the S/MIME key.
+ *
+ * @return string The HTML output.
+ */
+ protected function _outputSmimeKey()
+ {
+ if (empty($this->_impsmime)) {
+ return array();
}
- if (!empty($sig_result->cert)) {
- $cert_details = $this->_impsmime->parseCert($sig_result->cert);
- if (isset($cert_details['certificate']['subject']['CommonName'])) {
- $subject = $cert_details['certificate']['subject']['CommonName'];
- } elseif (isset($cert_details['certificate']['subject']['Email'])) {
- $subject = $cert_details['certificate']['subject']['Email'];
- } elseif (isset($sig_result->email)) {
- $subject = $sig_result->email;
- } elseif (isset($smime_from)) {
- $subject = $smime_from;
- } else {
- $subject = null;
- }
+ $raw_text = $this->_mimepart->getMimeId()
+ ? $this->_params['contents']->getBodyPart($this->_mimepart->getMimeId(), array('mimeheaders' => true, 'stream' => true))
+ : $this->_params['contents']->fullMessageText();
- if (!empty($subject) &&
- $GLOBALS['registry']->hasMethod('contacts/addField') &&
- $GLOBALS['prefs']->getValue('add_source')) {
- $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, Horde_Nls::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getUid(), $sig_id) . ' return false;') . _("Save in your Address Book") . '</a>';
- }
+ try {
+ $sig_result = $this->_impsmime->verifySignature($this->_mimepart->replaceEOL($raw_text, Horde_Mime_Part::RFC_EOL));
+ } catch (Horde_Exception $e) {
+ return array();
}
- return $ret;
+ return array(
+ $this->_mimepart->getMimeId() => array(
+ 'data' => $this->_impsmime->certToHTML($sig_result->cert),
+ 'status' => array(),
+ 'type' => 'text/html; charset=' . Horde_Nls::getCharset()
+ )
+ );
}
- /**
- * Generates output for encrypted S/MIME parts.
- *
- * @return array TODO
- */
- protected function _outputSMIMEEncrypted()
- {
- $id = $this->_mimepart->getMimeId();
- return isset(self::$_inlinecache[$id])
- ? self::$_inlinecache[$id]
- : array();
- }
}