loadRoots: function() { Shaaa.roots = []; // store a fingerprint of each one var certs = fs.readFileSync("./ca-bundle.crt", "utf-8").split("\n\n"); for (var i=0; i<certs.length; i++) Shaaa.roots.push(x509.parseCert(certs[i]).fingerPrint); },
cert: function(text) { var cert = x509.parseCert(text); var answer = Shaaa.algorithm(cert.signatureAlgorithm); return { algorithm: answer.algorithm, raw: answer.raw, good: answer.good, expires: cert.notAfter, name: cert.subject.commonName }; },