Skip to content

Commit

Permalink
fix: Update sign method to include additional certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed May 28, 2024
1 parent d8ecefe commit 0de1326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ export async function sign(options: SignOptions) {
const certs = new X509Certificates(options.additionalCertificates);

const ac: string[] = [];
args['ac'] = ac;
// Write file for each certificate
for (const cert of certs) {
const thumbprint = await cert.getThumbprint();
const certFile = path.join(__dirname, `${Buffer.from(new Uint8Array(thumbprint)).toString('hex')}.cer`);
await fs.writeFile(certFile, Buffer.from(new Uint8Array(cert.rawData)));
ac.push(certFile);
}
args['ac'] = ac;
}
if (options.fileDigestAlgorithm) {
args['fd'] = options.fileDigestAlgorithm;
Expand Down

0 comments on commit 0de1326

Please sign in to comment.