paypro: fix DERtoPEM.

This commit is contained in:
Christopher Jeffrey 2014-07-21 10:19:15 -07:00
parent 271ac2e9a5
commit a68c112371
1 changed files with 3 additions and 3 deletions

View File

@ -344,9 +344,9 @@ function wrapText(text, cols) {
function DERtoPEM(der, type) {
var type = type || 'UNKNOWN';
return ''
+ '-----BEGIN ' + type + '-----'
+ wrapText(der.toString('base64'), 64)
+ '-----END ' + type + '-----';
+ '-----BEGIN ' + type + '-----\n'
+ wrapText(der.toString('base64'), 64) + '\n'
+ '-----END ' + type + '-----\n';
}
module.exports = PayPro;