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) { function DERtoPEM(der, type) {
var type = type || 'UNKNOWN'; var type = type || 'UNKNOWN';
return '' return ''
+ '-----BEGIN ' + type + '-----' + '-----BEGIN ' + type + '-----\n'
+ wrapText(der.toString('base64'), 64) + wrapText(der.toString('base64'), 64) + '\n'
+ '-----END ' + type + '-----'; + '-----END ' + type + '-----\n';
} }
module.exports = PayPro; module.exports = PayPro;