Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

e2e library for handling PGP/MIME messages #323

Merged
merged 8 commits into from
Jul 14, 2015
Merged

e2e library for handling PGP/MIME messages #323

merged 8 commits into from
Jul 14, 2015

Conversation

yonigoogle
Copy link
Contributor

The original library was built by Yan Zhu from yahoo.
I've ported the library to e2e and made a number of changes to the original code.

The library will require some more work before it's finished, but I'd appreciate any advice/feedback at this point.
As of now, the library only supports the building of an outgoing PGP/MIME message.
I'll soon add the parsing of incoming messages.

@diracdeltas

diracdeltas and others added 3 commits November 14, 2014 18:10
I've ported the library to e2e and made a number of changes to the original code.

The library will require some more work before it's finished, but I'd appreciate any advice/feedback at this point.
As of now, the library only supports the building of an outgoing PGP/MIME message.

I will soon add the parsing of incoming messages.
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

goog.typeOf(this.content_) !== 'string') {
// lines are wrapped at 64 chars, per the PEM protocol. Newline characters
// will be stripped out of any encrypted content during decryption
lines.push(goog.typeOf(this.content_) === 'string' ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the indentation in the following lines seems wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does look a bit funny, though lint approved it. I'll change it though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, weird. I guess lint knows better than me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean lines 161/162, they look Googley to me.

'Content-Type: application/octet-stream',
'Content-Transfer-Encoding: base64',
'Content-Disposition: attachment; filename="example.txt"', '',
e2e.openpgp.pgpmime.Text.prettyTextWrap(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to put the literal string here, not call prettyTextWrap. That way, the expected result doesn't depend on the function working as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'll change that.

@diracdeltas
Copy link
Contributor

lgtm other than comments above. BTW, I should be covered under the Google corporate CLA (for Yahoo).

…o prettyTextWrap from text.js and changed the way buildMimeTree (in pgpmail.js) is called
*/

/**
* @fileoverview main module for the safemail app.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"main module" -> "Main module"

optionalHeaders: [
{name: constants.Mime.CONTENT_TYPE,
value: constants.Mime.ENCRYPTED,
params: {'charset': 'utf-8', 'name': 'version.asc'}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make version.asc and encrypted.asc constants.

@koto
Copy link
Member

koto commented Jul 9, 2015

LGTM modulo comments I've given.

}, this));
}

this.setBoundary_();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set it in buildMessage. That way the constructor is cheaper, and at that time you can generate a boundary that does not collide with the content.

…d parameters are valid, and various other fixes
Added tests for the regexp Header Value verification.
Various other small tweaks.
koto added a commit that referenced this pull request Jul 14, 2015
Added library for handling PGP/MIME messages.
@koto koto merged commit 07428ab into google:master Jul 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants