Skip to content

Commit

Permalink
Merge pull request #10 from mbwhite/json-structure
Browse files Browse the repository at this point in the history
fix: issue #9 wrong json structure
  • Loading branch information
mbwhite authored Nov 15, 2019
2 parents 15b9fcd + 370a992 commit 5209270
Show file tree
Hide file tree
Showing 6 changed files with 1,228 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports.verify = function(certPath, CABundlePath, cb) {

exports.parseCert = function(path) {

var ret = x509.parseCert(path);
var ret = x509.parseCert(path).exports;
var exts = {};
for (var key in ret.extensions) {
var newkey = key.replace('X509v3', '').replace(/ /g, '');
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"url": "[email protected]:ampretia/node-x509.git"
},
"scripts": {
"build": "node-gyp build",
"configure" : "node-gyp configure",
"build": "npm run configure && node-gyp build",
"clean": "rm -rf node_modules && rm package-lock.json && rm -rf build",
"test": "node test/test",
"release": "standard-version"
Expand Down
4 changes: 0 additions & 4 deletions src/x509.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ NAN_METHOD(get_altnames) {
Nan::Set(obj, Nan::New("altNames").ToLocalChecked(), try_parse(parsed_arg));
info.GetReturnValue().Set(obj);

// Local<Object> exports(try_parse(parsed_arg)->ToObject(Nan::GetCurrentContext()));
// Local<Value> key = Nan::New<String>("altNames").ToLocalChecked();
// info.GetReturnValue().Set(
// Nan::Get(exports, key).ToLocalChecked());
ERR_clear_error();
}

Expand Down
Loading

0 comments on commit 5209270

Please sign in to comment.