| | |
| | | public function addPGPSignature($body) |
| | | { |
| | | $this->signature = $body; |
| | | // Reset Content-Type to be overwritten with valid boundary |
| | | unset($this->headers['Content-Type']); |
| | | } |
| | | |
| | | /** |
| | |
| | | public function setPGPEncryptedBody($body) |
| | | { |
| | | $this->encrypted = $body; |
| | | // Reset Content-Type to be overwritten with valid boundary |
| | | unset($this->headers['Content-Type']); |
| | | } |
| | | |
| | | /** |
| | |
| | | $this->checkParams(); |
| | | |
| | | if ($this->type == self::PGP_SIGNED) { |
| | | $body = "This is an OpenPGP/MIME signed message (RFC 4880 and 3156)"; |
| | | $params = array( |
| | | 'preamble' => "This is an OpenPGP/MIME signed message (RFC 4880 and 3156)", |
| | | 'content_type' => "multipart/signed; micalg=pgp-sha1; protocol=\"application/pgp-signature\"", |
| | | 'eol' => $this->build_params['eol'], |
| | | ); |
| | | |
| | | $message = new Mail_mimePart($body, $params); |
| | | $message = new Mail_mimePart('', $params); |
| | | |
| | | if (!empty($this->body)) { |
| | | $headers = $this->message->headers(); |
| | |
| | | } |
| | | } |
| | | else if ($this->type == self::PGP_ENCRYPTED) { |
| | | $body = "This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)"; |
| | | $params = array( |
| | | 'preamble' => "This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)", |
| | | 'content_type' => "multipart/encrypted; protocol=\"application/pgp-encrypted\"", |
| | | 'eol' => $this->build_params['eol'], |
| | | ); |
| | | |
| | | $message = new Mail_mimePart($body, $params); |
| | | $message = new Mail_mimePart('', $params); |
| | | |
| | | $message->addSubpart('Version: 1', array( |
| | | 'content_type' => 'application/pgp-encrypted', |