Skip to content

Commit e507f76

Browse files
committed
Merge branch '1.0' into 1.0-tck
2 parents eb87d67 + 3c88364 commit e507f76

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Neo4j Driver for Javascript
22

3-
An alpha-level database driver for Neo4j 3.0.0+.
4-
5-
Note: This is in active development, the API is not stable. Please try it out and give us feedback, but expect things to break in the medium term!
3+
A database driver for Neo4j 3.0.0+.
64

75
Find detailed docs at [alpha.neohq.net](http://alpha.neohq.net/docs/javascript-driver/).
86

src/v1/internal/ch-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const TrustStrategy = {
100100
};
101101

102102
let socket = tls.connect(opts.port, opts.host, tlsOpts, function () {
103-
var serverCert = socket.getPeerCertificate(raw=true);
103+
var serverCert = socket.getPeerCertificate(/*raw=*/true);
104104

105105
if( !serverCert.raw ) {
106106
// If `raw` is not available, we're on an old version of NodeJS, and

test/internal/tls.test.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
var NodeChannel = require('../../lib/v1/internal/ch-node.js');
2020
var neo4j = require("../../lib/v1");
2121
var fs = require("fs");
22+
var hasFeature = require("../../lib/v1/internal/features");
2223

2324
describe('trust-signed-certificates', function() {
2425

@@ -46,7 +47,7 @@ describe('trust-signed-certificates', function() {
4647
});
4748

4849
it('should accept known certificates', function(done) {
49-
// Assuming we only run this test on NodeJS
50+
// Assuming we only run this test on NodeJS with TOFU support
5051
if( !NodeChannel.available ) {
5152
done();
5253
return;
@@ -56,7 +57,7 @@ describe('trust-signed-certificates', function() {
5657
driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j"), {
5758
encrypted: true,
5859
trust: "TRUST_SIGNED_CERTIFICATES",
59-
trustedCertificates: ["build/neo4j-enterprise-3.0.0/conf/ssl/snakeoil.cert"]
60+
trustedCertificates: ["build/neo4j-enterprise-3.0.0/certificates/snakeoil.cert"]
6061
});
6162

6263
// When
@@ -76,8 +77,8 @@ describe('trust-on-first-use', function() {
7677
var driver;
7778

7879
it('should accept previously un-seen hosts', function(done) {
79-
// Assuming we only run this test on NodeJS
80-
if( !NodeChannel.available ) {
80+
// Assuming we only run this test on NodeJS with TOFU support
81+
if( !hasFeature("trust_on_first_use") ) {
8182
done();
8283
return;
8384
}
@@ -104,8 +105,8 @@ describe('trust-on-first-use', function() {
104105
});
105106

106107
it('should should give helpful error if database cert does not match stored certificate', function(done) {
107-
// Assuming we only run this test on NodeJS
108-
if( !NodeChannel.available ) {
108+
// Assuming we only run this test on NodeJS with TOFU support
109+
if( !hasFeature("trust_on_first_use") ) {
109110
done();
110111
return;
111112
}
@@ -132,4 +133,4 @@ describe('trust-on-first-use', function() {
132133
driver.close();
133134
}
134135
});
135-
});
136+
});

0 commit comments

Comments
 (0)