File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,8 @@ const TrustStrategy = {
137
137
" the signing certificate, or the server certificate, to the list of certificates trusted by this driver" +
138
138
" using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This " +
139
139
" 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 ) ) ;
143
142
} else {
144
143
onSuccess ( ) ;
145
144
}
@@ -161,8 +160,8 @@ const TrustStrategy = {
161
160
" the signing certificate, or the server certificate, to the list of certificates trusted by this driver" +
162
161
" using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This " +
163
162
" 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 ) ) ;
166
165
} else {
167
166
onSuccess ( ) ;
168
167
}
Original file line number Diff line number Diff line change 16
16
* See the License for the specific language governing permissions and
17
17
* limitations under the License.
18
18
*/
19
-
19
+
20
20
import { debug } from "./log" ;
21
21
import { HeapBuffer } from "./buf" ;
22
22
import { newError } from './../error' ;
@@ -46,14 +46,14 @@ class WebSocketChannel {
46
46
let scheme = "ws" ;
47
47
//Allow boolean for backwards compatibility
48
48
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" ) {
51
51
scheme = "wss" ;
52
52
} else {
53
53
this . _error = newError ( "The browser version of this driver only supports one trust " +
54
54
"strategy, 'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES'. " + opts . trust + " is not supported. Please " +
55
55
"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." ) ;
57
57
return ;
58
58
}
59
59
}
@@ -81,7 +81,7 @@ class WebSocketChannel {
81
81
if ( self . onmessage ) {
82
82
var b = new HeapBuffer ( event . data ) ;
83
83
self . onmessage ( b ) ;
84
- }
84
+ }
85
85
} ;
86
86
87
87
this . _ws . onerror = this . _handleConnectionError ;
@@ -103,7 +103,7 @@ class WebSocketChannel {
103
103
}
104
104
}
105
105
}
106
-
106
+
107
107
isEncrypted ( ) {
108
108
return this . _encrypted ;
109
109
}
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ module.exports = function () {
155
155
"certificate, or the server certificate, to the list of certificates trusted by this driver using " +
156
156
"`neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This is a security measure to protect " +
157
157
"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 " ;
159
159
if ( this . error . message !== expected ) {
160
160
callback ( new Error ( "Given and expected results does not match: " + this . error . message + " Expected " + expected ) ) ;
161
161
} else {
You can’t perform that action at this time.
0 commit comments