Skip to content

Commit 0817504

Browse files
committed
remove debug info
1 parent bd17d95 commit 0817504

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

packages/hadron-build/lib/signtool.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
'use strict';
2-
const fs = require('fs');
3-
const crypto = require('crypto');
42
const path = require('path');
53
const debug = require('debug')('hadron-build:target');
64
const { sign: _garasign } = require('@mongodb-js/signing-utils');
@@ -53,20 +51,6 @@ function getSigningMethod(src) {
5351
}
5452
}
5553

56-
function hashFile(filename) {
57-
return new Promise((resolve, reject) => {
58-
const hash = crypto.createHash('sha256');
59-
const fh = fs.createReadStream(filename);
60-
61-
fh.on('data', d => hash.update(d));
62-
fh.on('end', () => {
63-
const digest = hash.digest('hex');
64-
resolve(digest);
65-
});
66-
fh.on('error', reject);
67-
});
68-
}
69-
7054
/**
7155
* We are signing the file using `gpg` or `jsign` depending on the
7256
* file extension. If the extension is `.exe` or `.msi`, we use `jsign`
@@ -92,9 +76,7 @@ async function sign(src, garasign = _garasign) {
9276
signingMethod: getSigningMethod(src),
9377
};
9478

95-
debug(`checksum of ${src} before signing: ${await hashFile(src)}`);
9679
await garasign(src, clientOptions);
97-
debug(`checksum of ${src} after signing: ${await hashFile(src)}`);
9880
}
9981

10082
module.exports = { sign, signArchive, getSignedFilename };

0 commit comments

Comments
 (0)