mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
fix: apply encoding on buffer level
This commit is contained in:
@ -9,9 +9,8 @@ export const addDigitalSignature = async (documentAsBase64: string): Promise<str
|
|||||||
const PDFArrayCustom = require("./PDFArrayCustom");
|
const PDFArrayCustom = require("./PDFArrayCustom");
|
||||||
const pdfBuffer = Buffer.from(documentAsBase64, "base64");
|
const pdfBuffer = Buffer.from(documentAsBase64, "base64");
|
||||||
const p12Buffer = Buffer.from(
|
const p12Buffer = Buffer.from(
|
||||||
fs.readFileSync(process.env.CERT_FILE_PATH || "ressources/certificate.p12", {
|
fs.readFileSync(process.env.CERT_FILE_PATH || "ressources/certificate.p12").toString(),
|
||||||
encoding: (process.env.CERT_FILE_ENCODING as BufferEncoding) || null,
|
(process.env.CERT_FILE_ENCODING as BufferEncoding) || undefined
|
||||||
})
|
|
||||||
);
|
);
|
||||||
const SIGNATURE_LENGTH = 12000;
|
const SIGNATURE_LENGTH = 12000;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user