Issues (18)

lib/x509/truststore.js (1 issue)

Labels
Severity
1 1
var jsrsasign = require('jsrsasign');
2
3
function parseCertFrom(string, encoding) {
4 136
    var cert = new jsrsasign.X509();
5 136
    cert.readCertHex(Buffer.from(string, encoding).toString('hex'));
0 ignored issues
show
The variable Buffer seems to be never declared. If this is a global, consider adding a /** global: Buffer */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
6 136
    return cert;
7
}
8
9
function parseCertFromBase64(string) {
10 136
    return parseCertFrom(string, 'base64');
11
}
12
13 1
var certificates = require('./ca-certificates.json');
14 1
var store = [];
15 1
Object.keys(certificates).map(function(key) {
16 136
    store.push(parseCertFromBase64(certificates[key]));
17
});
18
19
module.exports = store;
20