Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,12 @@ typedef struct _CERT_CONTEXT {
options.maxcerts = 300;
}

var hStoreHandle = null;
const hStoreHandle = Crypto.CertOpenSystemStoreA(null, StoreName);
var pCertContext = null;
if (hStoreHandle = Crypto.CertOpenSystemStoreA(null, StoreName)){
if (!ref.isNull(hStoreHandle)){
//console.log("The "+StoreName+" store has been opened as ", hStoreHandle);
} else {
console.log("The "+StoreName+" store failed to open.");
return [];
throw new Error('The '+StoreName+' store failed to open.');
}

var maxcerts = options.maxcerts;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-windows-root-certs",
"version": "1.0.0",
"version": "1.0.1",
"description": "Enables read of windows root certificates using ffi, and patching of node to use them",
"main": "index.js",
"scripts": {
Expand Down