Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with Node.js >= 4 #12

Closed
hugo19941994 opened this issue Jul 19, 2018 · 2 comments
Closed

Tests fail with Node.js >= 4 #12

hugo19941994 opened this issue Jul 19, 2018 · 2 comments

Comments

@hugo19941994
Copy link
Contributor

One of the tests which builds a signed JWT with RS256 fails:

    1) should generate and read a JWT signed using RS256, privKey 1024
  1) Jwt Utils Tests should generate and read a JWT signed using RS256, privKey 1024:
     AssertionError: expected [Error: error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length] to not exist
      at test/unit/jwt-utils-test.js:562:25
      at Object.buildJWT (lib/jwt-utils.js:425:16)
      at Context.<anonymous> (test/unit/jwt-utils-test.js:561:14)

Tested with Node.js 4, 6 and 8. iojs 2 works fine though

I will try to find what causes this

@palmerabollo
Copy link
Member

I can confirm the issue.

@hugo19941994
Copy link
Contributor Author

This is caused by a bug in NodeJS which was fixed from version 10.7 onwards (nodejs/node#21288). I'm not sure if a backport of the fix to version 8.x is planned.

It looks like errors in OpenSSL's CipherBase queue were not being handled properly. This AssertionError is actually an error in the queue from a previous unit test which was supposed to fail and was not being cleaned up internally. If all unit tests except this one are removed it will actually work.

Not much we can do from here. Closing the issue.

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

No branches or pull requests

2 participants