Example #1
0
 /**
  * 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->_getPartStream($this->_mimepart->getMimeId());
     try {
         $sig_result = $this->_impsmime->verifySignature($this->_mimepart->replaceEOL($raw_text, Horde_Mime_Part::RFC_EOL));
     } catch (Horde_Exception $e) {
         return array();
     }
     return array($this->_mimepart->getMimeId() => array('data' => $this->_impsmime->certToHTML($sig_result->cert), 'type' => 'text/html; charset=' . $this->getConfigParam('charset')));
 }
Example #2
0
 /**
  * Print certificate information.
  *
  * @param string $cert  The S/MIME certificate.
  */
 protected function _printCertInfo($cert = '')
 {
     $cert_info = $this->_smime->certToHTML($cert);
     $this->_textWindowOutput(_("S/MIME Key Information"), empty($cert_info) ? _("Invalid key") : $cert_info, !empty($cert_info));
 }