Skip to content

Commit c02ac01

Browse files
committed
Merge remote-tracking branch 'upstream/1.0' into 1.1
2 parents c981502 + 3bacfa4 commit c02ac01

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

lib/browser/neo4j-web.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28235,7 +28235,7 @@ function connect(url) {
2823528235
host: host(url),
2823628236
port: port(url) || 7687,
2823728237
// Default to using encryption if trust-on-first-use is available
28238-
encrypted: config.encrypted || (0, _features2["default"])("trust_on_first_use"),
28238+
encrypted: config.encrypted == null ? (0, _features2["default"])("trust_on_first_use") : config.encrypted,
2823928239
// Default to using trust-on-first-use if it is available
2824028240
trust: config.trust || ((0, _features2["default"])("trust_on_first_use") ? "TRUST_ON_FIRST_USE" : "TRUST_SIGNED_CERTIFICATES"),
2824128241
trustedCertificates: config.trustedCertificates || [],
@@ -28284,7 +28284,7 @@ var FEATURES = {
2828428284
// that supports reading the whole certificate, eg this commit:
2828528285
// https://github.com/nodejs/node/commit/345c40b6
2828628286
var desc = require('tls').TLSSocket.prototype.getPeerCertificate;
28287-
return desc.length() >= 1;
28287+
return desc.length >= 1;
2828828288
} catch (e) {
2828928289
return false;
2829028290
}

lib/browser/neo4j-web.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/browser/neo4j-web.test.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/v1/internal/connector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ function connect(url) {
490490
host: host(url),
491491
port: port(url) || 7687,
492492
// Default to using encryption if trust-on-first-use is available
493-
encrypted: config.encrypted || (0, _features2["default"])("trust_on_first_use"),
493+
encrypted: config.encrypted == null ? (0, _features2["default"])("trust_on_first_use") : config.encrypted,
494494
// Default to using trust-on-first-use if it is available
495495
trust: config.trust || ((0, _features2["default"])("trust_on_first_use") ? "TRUST_ON_FIRST_USE" : "TRUST_SIGNED_CERTIFICATES"),
496496
trustedCertificates: config.trustedCertificates || [],

lib/v1/internal/features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var FEATURES = {
3232
// that supports reading the whole certificate, eg this commit:
3333
// https://github.com/nodejs/node/commit/345c40b6
3434
var desc = require('tls').TLSSocket.prototype.getPeerCertificate;
35-
return desc.length() >= 1;
35+
return desc.length >= 1;
3636
} catch (e) {
3737
return false;
3838
}

src/v1/internal/connector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ function connect( url, config = {}) {
423423
host: host(url),
424424
port: port(url) || 7687,
425425
// Default to using encryption if trust-on-first-use is available
426-
encrypted : config.encrypted || hasFeature("trust_on_first_use"),
426+
encrypted : (config.encrypted == null) ? hasFeature("trust_on_first_use") : config.encrypted,
427427
// Default to using trust-on-first-use if it is available
428428
trust : config.trust || (hasFeature("trust_on_first_use") ? "TRUST_ON_FIRST_USE" : "TRUST_SIGNED_CERTIFICATES"),
429429
trustedCertificates : config.trustedCertificates || [],

src/v1/internal/features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const FEATURES = {
2727
// that supports reading the whole certificate, eg this commit:
2828
// https://github.com/nodejs/node/commit/345c40b6
2929
let desc = require('tls').TLSSocket.prototype.getPeerCertificate;
30-
return desc.length() >= 1;
30+
return desc.length >= 1;
3131
} catch( e ) {
3232
return false;
3333
}

test/internal/connector.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('connector', function() {
7676

7777
it('should provide error message when connecting to http-port', function(done) {
7878
// Given
79-
var conn = connect("bolt://localhost:7474");
79+
var conn = connect("bolt://localhost:7474", {encrypted:false});
8080

8181
// When
8282
conn.initialize( "mydriver/0.0.0", {scheme: "basic", principal: "neo4j", credentials: "neo4j"}, {

0 commit comments

Comments
 (0)