Skip to content

Multiple trustedCertificates throws error #105

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

Closed
alex-price opened this issue Jul 7, 2016 · 0 comments
Closed

Multiple trustedCertificates throws error #105

alex-price opened this issue Jul 7, 2016 · 0 comments

Comments

@alex-price
Copy link

For multiple trustedCertificates, e.g.
{trust: 'TRUST_SIGNED_CERTIFICATES', trustedCertificates: ['mycert.crt','intermediateca.crt','rootca.crt']}

Results in:
TypeError: Expected options to be either an object or a string, but got number instead at throwOptionsError (fs.js:75:9) at fs.readFileSync (fs.js:494:5) at Array.map (native) at Object.TRUST_SIGNED_CERTIFICATES (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/internal/ch-node.js:101:36) at connect (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/internal/ch-node.js:165:37) at new NodeChannel (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/internal/ch-node.js:198:18) at connect (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/internal/connector.js:489:25) at Driver._createConnection (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/driver.js:101:49) at Pool.acquire (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/internal/pool.js:69:21) at Driver.session (/Users/alexprice/nodejs/node_modules/neo4j-driver/lib/v1/driver.js:151:29)

In ch-node.js:
I changed this opts.trustedCertificates.map(_fs2['default'].readFileSync) to this opts.trustedCertificates.map(function(e) { return _fs2['default'].readFileSync(e); }).

Also, on an unrelated note, it would helpful to pass along the socket.authorizationError when !socket.authorized. This can be helpful when debugging TLS issues.

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

1 participant