Skip to content

Commit

Permalink
fix: issue ampretia#9 wrong json structure
Browse files Browse the repository at this point in the history
Wrong JSON structure

Signed-off-by: Matthew B. White <[email protected]>
  • Loading branch information
mbwhite committed Nov 15, 2019
1 parent 15b9fcd commit 370a992
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 370a992

Please sign in to comment.