Skip to content

Commit a3d3b60

Browse files
committed
Fix issues after merge conflicts.
1 parent aaf956f commit a3d3b60

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/v1/internal/ch-node.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ const TrustStrategy = {
137137
" the signing certificate, or the server certificate, to the list of certificates trusted by this driver" +
138138
" using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This " +
139139
" is a security measure to protect against man-in-the-middle attacks. If you are just trying " +
140-
" Neo4j out and are not concerned about encryption, simply disable it using `encrypted=\"" + ENCRYPTION_OFF +
141-
"\"` in the driver" +
142-
" options. Socket responded with: " + socket.authorizationError));
140+
" Neo4j out and are not concerned about encryption, simply disable it using `encrypted=\"" + ENCRYPTION_OFF + "\"`" +
141+
" in the driver options. Socket responded with: " + socket.authorizationError));
143142
} else {
144143
onSuccess();
145144
}
@@ -161,8 +160,8 @@ const TrustStrategy = {
161160
" the signing certificate, or the server certificate, to the list of certificates trusted by this driver" +
162161
" using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This " +
163162
" is a security measure to protect against man-in-the-middle attacks. If you are just trying " +
164-
" Neo4j out and are not concerned about encryption, simply disable it using `encrypted=false` in the driver" +
165-
" options."));
163+
" Neo4j out and are not concerned about encryption, simply disable it using `encrypted=\"" + ENCRYPTION_OFF + "\"`" +
164+
" in the driver options. Socket responded with: " + socket.authorizationError));
166165
} else {
167166
onSuccess();
168167
}

src/v1/internal/ch-websocket.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
19+
2020
import {debug} from "./log";
2121
import {HeapBuffer} from "./buf";
2222
import {newError} from './../error';
@@ -46,14 +46,14 @@ class WebSocketChannel {
4646
let scheme = "ws";
4747
//Allow boolean for backwards compatibility
4848
if( opts.encrypted === true || opts.encrypted === ENCRYPTION_ON ||
49-
(opts.encrypted === ENCRYPTION_NON_LOCAL && !isLocalHost(opts.host)) ||
50-
opts.trust === "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" ) {
49+
(opts.encrypted === ENCRYPTION_NON_LOCAL && !isLocalHost(opts.host)) ) {
50+
if((!opts.trust) || opts.trust === "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" ) {
5151
scheme = "wss";
5252
} else {
5353
this._error = newError("The browser version of this driver only supports one trust " +
5454
"strategy, 'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES'. "+opts.trust+" is not supported. Please " +
5555
"either use TRUST_CUSTOM_CA_SIGNED_CERTIFICATES or disable encryption by setting " +
56-
"`encrypted:\"" + ENCRYPTION_OFF + "\"` in the driver configuration.");
56+
"`encrypted:\"ENCRYPTION_OFF\"` in the driver configuration.");
5757
return;
5858
}
5959
}
@@ -81,7 +81,7 @@ class WebSocketChannel {
8181
if( self.onmessage ) {
8282
var b = new HeapBuffer( event.data );
8383
self.onmessage( b );
84-
}
84+
}
8585
};
8686

8787
this._ws.onerror = this._handleConnectionError;
@@ -103,7 +103,7 @@ class WebSocketChannel {
103103
}
104104
}
105105
}
106-
106+
107107
isEncrypted() {
108108
return this._encrypted;
109109
}

test/v1/tck/steps/tlssteps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module.exports = function () {
155155
"certificate, or the server certificate, to the list of certificates trusted by this driver using " +
156156
"`neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This is a security measure to protect " +
157157
"against man-in-the-middle attacks. If you are just trying Neo4j out and are not concerned about encryption, " +
158-
"simply disable it using `encrypted=\"ENCRYPTION_OFF\"` in the driver options.";
158+
"simply disable it using `encrypted=\"ENCRYPTION_OFF\"` in the driver options. Socket responded with: DEPTH_ZERO_SELF_SIGNED_CERT";
159159
if (this.error.message !== expected) {
160160
callback(new Error("Given and expected results does not match: " + this.error.message + " Expected " + expected));
161161
} else {

0 commit comments

Comments
 (0)