mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -05:00
Add dev build w/ patched OpenPGP.js containing signature verification
This commit is contained in:
parent
ec16dc91ad
commit
b11161655a
@ -1503,7 +1503,7 @@ module.exports = {
|
|||||||
|
|
||||||
show_version: true,
|
show_version: true,
|
||||||
show_comment: true,
|
show_comment: true,
|
||||||
versionstring: "OpenPGP.js v0.7.0",
|
versionstring: "OpenPGP.js v0.7.1-dev",
|
||||||
commentstring: "http://openpgpjs.org",
|
commentstring: "http://openpgpjs.org",
|
||||||
|
|
||||||
keyserver: "keyserver.linux.it", // "pgp.mit.edu:11371"
|
keyserver: "keyserver.linux.it", // "pgp.mit.edu:11371"
|
||||||
@ -9976,7 +9976,7 @@ var base64 = require('./base64.js'),
|
|||||||
* 5 = PRIVATE KEY BLOCK
|
* 5 = PRIVATE KEY BLOCK
|
||||||
*/
|
*/
|
||||||
function getType(text) {
|
function getType(text) {
|
||||||
var reHeader = /^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK)-----$\n/m;
|
var reHeader = /^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$\n/m;
|
||||||
|
|
||||||
var header = text.match(reHeader);
|
var header = text.match(reHeader);
|
||||||
|
|
||||||
@ -12498,6 +12498,22 @@ function readArmored(armoredText) {
|
|||||||
return newMessage;
|
return newMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a message object from signed content and a detached armored signature.
|
||||||
|
* @param {String} content An 8 bit ascii string containing e.g. a MIME subtree with text nodes or attachments
|
||||||
|
* @param {String} detachedSignature The detached ascii armored PGP signarure
|
||||||
|
*/
|
||||||
|
function readSignedContent(content, detachedSignature) {
|
||||||
|
var literalDataPacket = new packet.Literal();
|
||||||
|
literalDataPacket.setBytes(content, enums.read(enums.literal, enums.literal.binary));
|
||||||
|
var packetlist = new packet.List();
|
||||||
|
packetlist.push(literalDataPacket);
|
||||||
|
var input = armor.decode(detachedSignature).data;
|
||||||
|
packetlist.read(input);
|
||||||
|
var newMessage = new Message(packetlist);
|
||||||
|
return newMessage;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates new message object from text
|
* creates new message object from text
|
||||||
* @param {String} text
|
* @param {String} text
|
||||||
@ -12531,6 +12547,7 @@ function fromBinary(bytes) {
|
|||||||
|
|
||||||
exports.Message = Message;
|
exports.Message = Message;
|
||||||
exports.readArmored = readArmored;
|
exports.readArmored = readArmored;
|
||||||
|
exports.readSignedContent = readSignedContent;
|
||||||
exports.fromText = fromText;
|
exports.fromText = fromText;
|
||||||
exports.fromBinary = fromBinary;
|
exports.fromBinary = fromBinary;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ define(function(require) {
|
|||||||
keySize = 512,
|
keySize = 512,
|
||||||
keyId = 'F6F60E9B42CDFF4C',
|
keyId = 'F6F60E9B42CDFF4C',
|
||||||
pubkey = '-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n' +
|
pubkey = '-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n' +
|
||||||
'Version: OpenPGP.js v0.7.0\r\n' +
|
'Version: OpenPGP.js v0.7.1-dev\r\n' +
|
||||||
'Comment: http://openpgpjs.org\r\n' +
|
'Comment: http://openpgpjs.org\r\n' +
|
||||||
'\r\n' +
|
'\r\n' +
|
||||||
'xk0EUlhMvAEB/2MZtCUOAYvyLFjDp3OBMGn3Ev8FwjzyPbIF0JUw+L7y2XR5\r\n' +
|
'xk0EUlhMvAEB/2MZtCUOAYvyLFjDp3OBMGn3Ev8FwjzyPbIF0JUw+L7y2XR5\r\n' +
|
||||||
@ -25,7 +25,7 @@ define(function(require) {
|
|||||||
'=6XMW\r\n' +
|
'=6XMW\r\n' +
|
||||||
'-----END PGP PUBLIC KEY BLOCK-----\r\n\r\n',
|
'-----END PGP PUBLIC KEY BLOCK-----\r\n\r\n',
|
||||||
privkey = '-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n' +
|
privkey = '-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n' +
|
||||||
'Version: OpenPGP.js v0.7.0\r\n' +
|
'Version: OpenPGP.js v0.7.1-dev\r\n' +
|
||||||
'Comment: http://openpgpjs.org\r\n' +
|
'Comment: http://openpgpjs.org\r\n' +
|
||||||
'\r\n' +
|
'\r\n' +
|
||||||
'xcBeBFJYTLwBAf9jGbQlDgGL8ixYw6dzgTBp9xL/BcI88j2yBdCVMPi+8tl0\r\n' +
|
'xcBeBFJYTLwBAf9jGbQlDgGL8ixYw6dzgTBp9xL/BcI88j2yBdCVMPi+8tl0\r\n' +
|
||||||
|
Loading…
Reference in New Issue
Block a user