Fixes erroneous linefeed handle in write_signed_message()
Fixes #109, courtsey of encomiast
This commit is contained in:
parent
19a5d00d4a
commit
4379bba2cd
|
@ -400,8 +400,8 @@ function _openpgp () {
|
||||||
* This can be directly used to OpenPGP armor the message
|
* This can be directly used to OpenPGP armor the message
|
||||||
*/
|
*/
|
||||||
function write_signed_message(privatekey, messagetext) {
|
function write_signed_message(privatekey, messagetext) {
|
||||||
var sig = new openpgp_packet_signature().write_message_signature(1, messagetext.replace(/\r\n/g,"\n").replace(/\n/,"\r\n"), privatekey);
|
var sig = new openpgp_packet_signature().write_message_signature(1, messagetext.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n"), privatekey);
|
||||||
var result = {text: messagetext.replace(/\r\n/g,"\n").replace(/\n/,"\r\n"), openpgp: sig.openpgp, hash: sig.hash};
|
var result = {text: messagetext.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n"), openpgp: sig.openpgp, hash: sig.hash};
|
||||||
return openpgp_encoding_armor(2,result, null, null)
|
return openpgp_encoding_armor(2,result, null, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user