Commit f3b15bf6 authored by Alberto Inch's avatar Alberto Inch
Browse files

Removiendo cabecera de certificado PEM.

parent 0e75897d
......@@ -86,7 +86,6 @@ class Dsig {
Reference: this.signedInfo.Reference
}
}, this.signOpt).split('\n').map(e => e.trim()).join('\n');
console.log(signedInfoXML);
let signature = this.signatureValue(signedInfoXML);
doc[root].Signature = {
_attributes: {
......
......@@ -27,7 +27,12 @@ class Token {
getCertificate() {
for (let i = 0; i < this.p12Asn1.safeContents.length; i++) {
if (this.p12Asn1.safeContents[i].safeBags[0].cert) {
return forge.pki.certificateToPem(this.p12Asn1.safeContents[i].safeBags[0].cert);
const b64 = forge.pki.certificateToPem(this.p12Asn1.safeContents[i].safeBags[0].cert);
const l = b64.split('\n');
l.pop();
l.pop();
l[0] = '';
return l.join('\n');
}
}
return null;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment