Skip to content

Multiple trustedCertificates throws error #105

Closed
@alex-price

Description

@alex-price

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions