Skip to content

fix verify crash caused by invalid cert format#60

Merged
yorkie merged 4 commits intoSouthern:masterfrom
qile222:master
Nov 28, 2017
Merged

fix verify crash caused by invalid cert format#60
yorkie merged 4 commits intoSouthern:masterfrom
qile222:master

Conversation

@qile222
Copy link
Contributor

@qile222 qile222 commented Nov 28, 2017

function verify should return after call Nan::ThrowError, otherwise point memory will be free multi times, and then crash the main thread.

@yorkie
Copy link
Collaborator

yorkie commented Nov 28, 2017

Hi @lolBig I have fixed the verification expiration issue at #62, and may I ask you to add some tests for your patch?

chenximin added 2 commits November 28, 2017 21:59
test/test.js Outdated
path.join(__dirname, 'certs/equifax.crt'),
path.join(__dirname, '/test.js'),
function(err, result) {
assert.notStrictEqual(err, null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should throw an invalid format error here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error was caught by function verify

@yorkie
Copy link
Collaborator

yorkie commented Nov 28, 2017

Rad! LGTM if CI is green @lolBig :)

@yorkie yorkie merged commit 75a6a3d into Southern:master Nov 28, 2017
@yorkie
Copy link
Collaborator

yorkie commented Nov 28, 2017

Merged and published at v0.3.3 :)

/cc @Southern

@Southern
Copy link
Owner

Why is there a do {...} while (0); loop introduced in this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants