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

PEM_read_bio_PrivateKey:bad password read in parallel/test-tls-passphrase ? #1760

Closed
dankegel opened this issue Feb 11, 2019 · 3 comments
Closed

Comments

@dankegel
Copy link

Hi! I'm trying to do a trivial backport of Ubuntu 19.04's nodejs to Ubuntu 18.04.
It's using system openssl (1.1.0g), and I'm getting a test failure while building.
Happily, I can reproduce it easily:

dank@dank-dell3620:~/xsrc/nodejs$ /usr/bin/python2.7 tools/test.py test/parallel/test-tls-passphrase.js 
=== release test-tls-passphrase ===                    
Path: parallel/test-tls-passphrase
assert.js:660
    throw actual;
    ^

Error: error:0907B068:PEM routines:PEM_read_bio_PrivateKey:bad password read
    at Object.createSecureContext (_tls_common.js:157:17)
    at Object.connect (_tls_wrap.js:1127:48)
    at /home/dank/xsrc/nodejs/test/parallel/test-tls-passphrase.js:228:7
    at getActual (assert.js:578:5)
    at Function.throws (assert.js:690:24)
    at Object.<anonymous> (/home/dank/xsrc/nodejs/test/parallel/test-tls-passphrase.js:227:8)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
Command: ./node /home/dank/xsrc/nodejs/test/parallel/test-tls-passphrase.js
[00:00|% 100|+   0|-   1]: Done        

This test seems like it's been changed a few times recently,
nodejs/node#22978

Anyone else run into this?

@dankegel
Copy link
Author

This seems to do the trick:

--- a/test/parallel/test-tls-passphrase.js
+++ b/test/parallel/test-tls-passphrase.js
@@ -221,7 +221,7 @@ server.listen(0, common.mustCall(function() {
   }, common.mustCall());
 })).unref();
 
-const errMessagePassword = /bad decrypt/;
+const errMessagePassword = /bad decrypt|asn1 encoding routines|bad password read/;
 
 // Missing passphrase
 assert.throws(function() {

@addaleax
Copy link
Member

@dankegel I think it’s more than okay to open a PR against https://github.com/nodejs/node/ with this :)

@dankegel
Copy link
Author

Not sure it's worth it? Building with so much skew between versions of system libraries and node is probably not a great idea, as dozens of tests failed. I've backed off to debian/10.4.0_dfsg-2 because it only required one tiny change, and is passing enough tests that 'debuild -b -uc -us' just works.

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