@@ -21,6 +21,14 @@ function runTest(serverDisabledProtos, clientDisabledProtos) {
21
21
if ( implementation === "openssl" ) {
22
22
expectedRegex =
23
23
/ E r r o r : c o u l d n ' t c o n n e c t t o s e r v e r .* : [ 0 - 9 ] * , c o n n e c t i o n a t t e m p t f a i l e d : S o c k e t E x c e p t i o n : t l s v 1 a l e r t p r o t o c o l v e r s i o n / ;
24
+
25
+ // OpenSSL does not send alerts and TLS 1.3 is too difficult to identify as incompatible
26
+ // because it shows up in a TLS extension.
27
+ if ( ! sslProviderSupportsTLS1_1 ( ) ) {
28
+ expectedRegex =
29
+ / E r r o r : c o u l d n ' t c o n n e c t t o s e r v e r .* : [ 0 - 9 ] * , c o n n e c t i o n a t t e m p t f a i l e d : S o c k e t E x c e p t i o n : s t r e a m t r u n c a t e d / ;
30
+ }
31
+
24
32
} else if ( implementation === "windows" ) {
25
33
expectedRegex =
26
34
/ E r r o r : c o u l d n ' t c o n n e c t t o s e r v e r .* : [ 0 - 9 ] * , c o n n e c t i o n a t t e m p t f a i l e d : S o c k e t E x c e p t i o n : T h e f u n c t i o n r e q u e s t e d i s n o t s u p p o r t e d / ;
@@ -51,12 +59,17 @@ function runTest(serverDisabledProtos, clientDisabledProtos) {
51
59
clientDisabledProtos ) ;
52
60
mongoOutput = rawMongoProgramOutput ( ) ;
53
61
return mongoOutput . match ( expectedRegex ) ;
54
- } , "Mongo shell output was as follows:\n" + mongoOutput + "\n************" ) ;
62
+ } , "Mongo shell output was as follows:\n" + mongoOutput + "\n************" , 60 * 1000 ) ;
55
63
56
64
MongoRunner . stopMongod ( md ) ;
57
65
}
58
66
59
- // Client recieves and reports a protocol version alert if it advertises a protocol older than
67
+ // Client receives and reports a protocol version alert if it advertises a protocol older than
60
68
// the server's oldest supported protocol
61
- runTest ( "TLS1_0" , "TLS1_1,TLS1_2" ) ;
69
+ if ( ! sslProviderSupportsTLS1_1 ( ) ) {
70
+ // On platforms that disable TLS 1.1, assume they have TLS 1.3 for this test.
71
+ runTest ( "TLS1_2" , "TLS1_3" ) ;
72
+ } else {
73
+ runTest ( "TLS1_0" , "TLS1_1,TLS1_2" ) ;
74
+ }
62
75
} ( ) ) ;
0 commit comments