return null;
}
- $raw_text = $this->_mimepart->getMimeId()
- ? $this->getConfigParam('imp_contents')->getBodyPart($this->_mimepart->getMimeId(), array('mimeheaders' => true, 'stream' => true))
- : $this->getConfigParam('imp_contents')->fullMessageText();
+ $raw_text = $this->_getPartStream($this->_mimepart->getMimeId());
try {
$decrypted_data = $this->_impsmime->decryptMessage($this->_mimepart->replaceEOL($raw_text, Horde_Mime_Part::RFC_EOL));
$hdrs->addHeader('From', $this->_mimepart->getMetadata('imp-smime-from'));
$stream = $this->_mimepart->toString(array('headers' => $hdrs, 'stream' => true));
} else {
- $stream = $base_id
- ? $this->getConfigParam('imp_contents')->getBodyPart($base_id, array('mimeheaders' => true, 'stream' => true))
- : $this->getConfigParam('imp_contents')->fullMessageText(array('stream' => true));
+ $stream = $this->_getPartStream($base_id);
}
$raw_text = $this->_mimepart->replaceEOL($stream, Horde_Mime_Part::RFC_EOL);
return array();
}
- $raw_text = $this->_mimepart->getMimeId()
- ? $this->getConfigParam('imp_contents')->getBodyPart($this->_mimepart->getMimeId(), array('mimeheaders' => true, 'stream' => true))
- : $this->getConfigParam('imp_contents')->fullMessageText();
+ $raw_text = $this->_getPartStream($this->_mimepart->getMimeId());
try {
$sig_result = $this->_impsmime->verifySignature($this->_mimepart->replaceEOL($raw_text, Horde_Mime_Part::RFC_EOL));
);
}
+ /**
+ */
+ protected function _getPartStream($id)
+ {
+ return $id
+ ? $this->getConfigParam('imp_contents')->getBodyPart($id, array('mimeheaders' => true, 'stream' => true))
+ : $this->getConfigParam('imp_contents')->fullMessageText();
+ }
+
}