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 = {
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 }
Original file line number Diff line number Diff line change 1616 * See the License for the specific language governing permissions and
1717 * limitations under the License.
1818 */
19-
19+
2020import { debug } from "./log" ;
2121import { HeapBuffer } from "./buf" ;
2222import { 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 }
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments