Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
OpenPGP/MIME encrypted messages using RFC 4880 and 3156 implemented i…
Browse files Browse the repository at this point in the history
…n Thunderbird/Enigmail can be decrypted and verified by this Zimlet by dragging the message and drop it onto the Zimlet panel icon. This is beta functionality and only text/plain is supported.
  • Loading branch information
Barry de Graaff committed Feb 3, 2015
1 parent b60e333 commit 8518c7a
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Bugs and feedback: https://github.com/barrydegraaff/pgp-zimlet/issues
su zimbra
cd /tmp
rm tk_barrydegraaff_zimbra_openpgp*
wget https://github.com/barrydegraaff/pgp-zimlet-binaries/raw/master/1.4.2/tk_barrydegraaff_zimbra_openpgp.zip
wget https://github.com/barrydegraaff/pgp-zimlet-binaries/raw/master/1.4.3/tk_barrydegraaff_zimbra_openpgp.zip
zmzimletctl deploy tk_barrydegraaff_zimbra_openpgp.zip
(wait 15 minutes for the deploy to propagate; or zmprov fc all)

Expand All @@ -51,8 +51,8 @@ As of version 1.2.4 you can optionally store your private key in your browsers l

### DEALING WITH LARGE ENCRYPTED MESSAGES

If you receive a large encrypted message and Zimbra displays "This message is too large to display properly."
You have to click "View entire message" and then drag/drop it onto the Zimlet again after a minute or so.
Problem: I am not getting an expected result in the message view.
Solution: Please drag and drop the message onto the Zimlet.

========================================================================

Expand Down
2 changes: 1 addition & 1 deletion conf.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.4.2
VERSION=1.4.3
PACKAGE=zcs-openpgp
MAINTAINER=Barry de Graaff <[email protected]>
SECTION=free/zcs-mail
Expand Down
166 changes: 166 additions & 0 deletions test/thunderbird-engimail-test-keypair.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
pub 4096R/874D020F 2015-02-03
uid bar <bar@localhost>
sub 4096R/752A1767 2015-02-03

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Oe3A3GROeWaVi1di
RqUaNdlgWsCk+dvV+PkCX1OlIyuNYIp4Srz32rknJJbXtmfujJEtyt9ZiCBn8qmU
z2PLyrrG8vPx6oIpjKLPnX6pASoY//JhtpGpYY+Xm1BUo3G2SNcY6Q6crJEXUqyR
qoW9sxYmoWpEjaUFABEBAAGJAh8EGAECAAkFAlTQho8CGwwACgkQgQmjs4dNAg/u
nxAAwiAQYIkwQxc0WdpzdKSCWXOUhmpXfyGHHcbxwp+DrYDmmSnf1h5jkgH6RYSp
9rQksFhgpFoWm6wAm7wA+Kgm6OTPUJ5xzPagSmX2WHBsBcxqOB7P91oLypKWYzpB
vP61iGfE5EZKlrqxvoquUq8yJqg/dZRSOMvIKcxfFc6EVA4IxVQHcV8nnz1p8IPn
E/U+ouLme+MY/eIAD6pt3Zq8zpjyRqoJVkGaHJlYi8TTp18IcXwticzPd88VE3Ei
6LycW4nxWKPFsAbYjhahJeSSBdAk77lZHgtKSva7Vz8ar1QruR9lNoRlrlqTlvfk
C/py0L8zuYkY6AeBvjPmwzqVu2qdVOqgHHbsLevRZhwgE9PKd3R/vM1HjVmiSJh5
q/e/yg11IhWUNw3Cw6P3fB2+qvuIhBDrfDCH+I6RzAjbX7GUIoH8ItkfXF5oQAbf
6mV1nTBpNCHHV7M3l5bSXJqaXTzwv7zxXzGSuyKCUhNv9cgU3neCndVsBfOwrjjv
1fuU2Si8xFcKoiC1qAslEK+INtcJ1w9HxrvjLz7PDUwi8fRN9Nh46p2L2eHCsyYe
7BJEglDYuwavdZ0Bn9rrpC06FY9jKuUwTocIbQIGoa5ckDOKrwrQw9Dt5l7spmLO
kBuP60uX2YdB205YseOKevEfXPHj9V0UHjswvju34GgNxDE=
=Jblr
-----END PGP PUBLIC KEY BLOCK-----
[bar@localhost ~]$ gpg --export-secret-keys --armor 874D020F
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)

lQc+BFTQho8BEADXarivlK4LEDkErQeYkINuwY6Wl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UwTocIbQIG
oa5ckDOKrwrQw9Dt5l7spmLOkBuP60uX2YdB205YseOKevEfXPHj9V0UHjswvju3
4GgNxDE=
=PHG3
-----END PGP PRIVATE KEY BLOCK-----
Binary file added test/thunderbird-engimail-test-message.eml.tgz
Binary file not shown.
15 changes: 15 additions & 0 deletions tk_barrydegraaff_zimbra_openpgp/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ <h2>Contents</h2>
<li><a href="#sign">Clear signing a message</a></li>
<li><a href="#adding">Adding Public Keys</a></li>
<li><a href="#encrypt">Encrypting a message</a></li>
<li><a href="#thunderbird-enigmail">Thunderbird/Enigmail compatibility</a></li>
<li><a href="#contacts-scanning">Storing public keys to Zimbra contacts</a></li>
<li><a href="#about">About OpenPGP Zimlet</a></li>
<li><a href="#licenses">License and third party FOSS libraries</a></li>
</ul>
Expand Down Expand Up @@ -146,6 +148,19 @@ <h2>Encrypting a message</h2>
<br><img src="decrypt-verify-result.png" alt=""><br><hr><br>


<br><br><a name="thunderbird-enigmail"></a>
<h1>Reading messages encrypted/signed with Thunderbird/Enigmail</h1>
OpenPGP/MIME encrypted messages using RFC 4880 and 3156 implemented in Thunderbird/Enigmail can be decrypted and verified by this Zimlet by dragging the message and drop it onto the Zimlet panel icon. This is beta functionality and only text/plain is supported.<br>
<br><img src="thunderbird-enigmail-support.png" alt=""><br>
<br><img src="thunderbird-enigmail-support-result.png" alt=""><br><hr><br>

<br><br><a name="contacts-scanning"></a>
<h1>Storing public keys to Zimbra contacts</h1>
Optionally you can store public keys in Contacts, the Zimbra Addressbook. First enable the Scan Contacts option then copy/paste public keys to the notes field of your contacts.<br>
<br><img src="scan-contacts.png" alt=""><br>
<br><img src="scan-contacts-book.png" alt=""><br><hr><br>


<br><br><a name="about"></a>
<h1>Zimbra OpenPGP Zimlet</h1>If you find Zimbra OpenPGP Zimlet useful and want to support its continued development, you can make donations via:
<ul>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 34 additions & 15 deletions tk_barrydegraaff_zimbra_openpgp/tk_barrydegraaff_zimbra_openpgp.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,31 +184,50 @@ function(itemId) {
* */
tk_barrydegraaff_zimbra_openpgp.prototype.doDrop =
function(zmObject) {

//http://wiki.zimbra.com/wiki/Zimlet_cookbook_based_on_JavaScript_API#Download_Entire_Email
this.srcMsgObj = zmObject.srcObj;
if(this.srcMsgObj.type == "CONV"){
this.srcMsgObj = this.srcMsgObj.getFirstHotMsg();
}
var url = [];
var i = 0;
var proto = location.protocol;
var port = Number(location.port);
url[i++] = proto;
url[i++] = "//";
url[i++] = location.hostname;
if (port && ((proto == ZmSetting.PROTO_HTTP && port != ZmSetting.HTTP_DEFAULT_PORT)
|| (proto == ZmSetting.PROTO_HTTPS && port != ZmSetting.HTTPS_DEFAULT_PORT))) {
url[i++] = ":";
url[i++] = port;
}
url[i++] = "/home/";
url[i++]= AjxStringUtil.urlComponentEncode(appCtxt.getActiveAccount().name);
url[i++] = "/message.txt?fmt=txt&id=";
url[i++] = this.srcMsgObj.id;

var getUrl = url.join("");

//Now make an ajax request and read the contents of this mail, including all attachments as text
//it should be base64 encoded
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", getUrl, false );
xmlHttp.send( null );

var msg = xmlHttp.responseText;

openpgp.initWorker('/service/zimlet/_dev/tk_barrydegraaff_zimbra_openpgp/openpgp.worker.js');

if (tk_barrydegraaff_zimbra_openpgp.prototype.addressBookReadInProgress == true)
{
this.status("Still loading contacts, ignoring your addressbook", ZmStatusView.LEVEL_INFO);
}

var msgObj = zmObject.srcObj;

//if its a conversation i.e. "ZmConv" object, get the first loaded message "ZmMailMsg" object within that.
if (zmObject.type == "CONV") {
msgObj = zmObject.getFirstHotMsg();
}

var clearSignedRegEx = new RegExp('[\-]*BEGIN PGP SIGNATURE[\-]*');
var pgpMessageRegEx = new RegExp('[\-]*BEGIN PGP MESSAGE[\-]*');
var msg = zmObject.body;

if(this.getUserPropertyInfo("zimbra_openpgp_pubkeys30").value == 'debug')
{
console.log(zmObject);
console.log(msgObj);
console.log(msg);
}

if (msg.match(clearSignedRegEx)) {
try {
var message = openpgp.cleartext.readArmored(msg);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="1.4.2" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="1.4.3" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<summary>
Zimbra OpenPGP Zimlet

Expand Down

0 comments on commit 8518c7a

Please sign in to comment.