Skip to content

Commit

Permalink
Fixed tlsCAFile problem if passed more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio committed Apr 12, 2021
1 parent bafe406 commit 752a200
Show file tree
Hide file tree
Showing 29 changed files with 1,480 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Recent change notes

### 0.7.0

- Fixed problem with tls CAFile parameter if passed more than once.

### 0.7.0-nullsafety.3

- Documentation and examples
Expand Down
2 changes: 1 addition & 1 deletion lib/mongo_dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ library mongo_dart;
import 'dart:async';
import 'dart:collection';
import 'dart:convert' show base64, utf8;
import 'dart:io' show File, FileMode, IOSink, SecureSocket, SecurityContext, Socket;
import 'dart:io' show File, FileMode, IOSink, SecureSocket, SecurityContext, Socket, TlsException;
import 'dart:math';
import 'dart:typed_data';
import 'package:collection/collection.dart';
Expand Down
18 changes: 17 additions & 1 deletion lib/src/network/connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const noSecureRequestError = 'The socket connection has been reset by peer.'
'\n- Trying to connect to an ssl/tls encrypted database without specifiyng'
'\n either the query parm tls=true '
'or the secure=true parameter in db.open()'
'\n- The server requires a key certificate from the client, '
'but no certificate has been sent'
'\n- Others';

class _ServerCapabilities {
Expand Down Expand Up @@ -65,6 +67,7 @@ class _ServerCapabilities {
}

class Connection {
static bool _caCertificateAlreadyInHash = false;
final Logger _log = Logger('Connection');
final _ConnectionManager _manager;
ServerConfig serverConfig;
Expand Down Expand Up @@ -96,7 +99,8 @@ class Connection {
try {
if (serverConfig.isSecure) {
var securityContext = SecurityContext.defaultContext;
if (serverConfig.tlsCAFileContent != null) {
if (serverConfig.tlsCAFileContent != null &&
!_caCertificateAlreadyInHash) {
securityContext
.setTrustedCertificatesBytes(serverConfig.tlsCAFileContent!);
}
Expand All @@ -117,6 +121,18 @@ class Connection {
} else {
_socket = await Socket.connect(serverConfig.host, serverConfig.port);
}
} on TlsException catch (e) {
if (e.osError?.message
.contains('CERT_ALREADY_IN_HASH_TABLE(x509_lu.c:356)') ??
false) {
_caCertificateAlreadyInHash = true;
return connect();
}
_closed = true;
connected = false;
var ex = ConnectionException(
'Could not connect to ${serverConfig.hostUrl}\n- $e');
throw ex;
} catch (e) {
_closed = true;
connected = false;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mongo_dart
version: 0.7.0-nullsafety.3
version: 0.7.0
description: MongoDB driver, implemented in pure Dart. All CRUD operations, aggregation pipeline and more!
homepage: https://github.com/mongo-dart/mongo_dart

Expand Down
33 changes: 33 additions & 0 deletions test/certificates_for_testing/client.mongo.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-----BEGIN CERTIFICATE-----
MIIFtzCCA5+gAwIBAgIUVB4ZgIwuUsRDcEnrZ3cvPMzYbbAwDQYJKoZIhvcNAQEL
BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV
BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy
MDgzNDM1WhcNMjIwNDEyMDgzNDM1WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB
IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGY2xp
ZW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwqp7yYDgemk8dmyC
NlvYPlIe4y/lqQ4M7vX8hpxr+8lBcD+eClIzrMSOTuDmbhC/PJtYO3M7kE/ZoNRm
3iEa16HkbroPuLN+bzsKeY/Xt0wdo+1+jH+SMH5d/wdDrQQhd7B+IEJP80HORd65
wrkPL55rInmfJtG2eNosj5gcOT9vQTaQOdTAnAIU2QzC6xGtqOpQc2p9nf72UT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8UiFlZqwCwnx4YQv3bN/RwECMf1vnGwQd6761koptJFhVr
9ayva5L7lSR/hxjX/b5ohkChR3ttes34bBuo+7/EvBYZtHwiziUeRGyd90TCcBrP
fDe8gR1LuTmnhNqwOpUdXob4lJ5/vKcIh4AZI0k+lyJG/193CLAWAaDVLtX8QU4l
YM+PukfrdXVllLzfOFiBfbSOrXkDbvXe00zBLPizUPpMLJkGB7Farn9qq4wYrJvk
RHm/pX8T8l90Sd8uDz0Q77tYKujaJtbosV0xzJ2yN+OISLtXB22KXCMJx7M+M4Wo
pIDRd6PW/qx+i8Cx7Wf1Lv9ZFWfm7sjWbZeI
-----END CERTIFICATE-----
51 changes: 51 additions & 0 deletions test/certificates_for_testing/client.mongo.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAwqp7yYDgemk8dmyCNlvYPlIe4y/lqQ4M7vX8hpxr+8lBcD+e
ClIzrMSOTuDmbhC/PJtYO3M7kE/ZoNRm3iEa16HkbroPuLN+bzsKeY/Xt0wdo+1+
jH+SMH5d/wdDrQQhd7B+IEJP80HORd65wrkPL55rInmfJtG2eNosj5gcOT9vQTaQ
OdTAnAIU2QzC6xGtqOpQc2p9nf72UTxWinbNn+6bClYvlcfEezOQ5rNNq9XV9gJA
6nPC+WB9v6kdUOtKRKJ3vbm13+3SWF0iuK4Ob2u061m+yI/K7bZLvgtfCWhqHB8Y
bUMfCCUArSCkN80WjxqqCIUt/R0DIPkRR+HbTHYoWyMMJEiTj5LhL9pYwOlSP+md
a4hRU/Z93W2p1IfT8k5u8mAAcfTBo9uRv8IOC7ZnhbLym7qqC8oEbwCJQgQBjAF1
H6ybJ+HNZbL3ijQzq2OGgcDZggWAFtBIvG/ICH+LtuiEjXeUk5TvYTjQXCeYQUYE
7WkFUZ7FXXI+VflOXmlGcrt5g1YWJnRrOODfocEXAugrme7SqCOwXs5ksoW8KRDm
HqnMR3XNA02ypXG3/9s6sU00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DnuUsc1FpdnkKqJo6MAYIOnXNJebPUpHqiYRYi3SMKlXKgQJ0bI96VvI
ZRlWHhbC1WL/8al04qvOJx724eY7eK91AoIBAHKAx5kG+b7RLAk8XfiODbARZPHy
Qx/l0McTh7D0idgdpA0IDy39ebsOqxULXY3f3U2X10Oh6SpFAqSU7k2DWPoejFFt
w1wT0z+c5YnJ5TtREc8gwX5CAqawTJnjRwL3hhfIZZWmWHGM+X2XoB+vNiVR2LcI
e4WuxPY4bd4u8l4r/gSUV7WEzkk5H9ltCmFWlzB67WBXrdC7L20BZRrlKS+FYMgP
3Y8YoBjYYD8Y6bcxCpboHIyCpadlrBEtqou4r4ZWrKGEY3r5EyTXv5FJs9PA6Gp1
CLmiFKhS4HCovJBHc1I0l1eO93C8OSLcMppndw06gtAQXDy1t88LaQz0UNM=
-----END RSA PRIVATE KEY-----
84 changes: 84 additions & 0 deletions test/certificates_for_testing/client.mongo.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
-----BEGIN CERTIFICATE-----
MIIFtzCCA5+gAwIBAgIUVB4ZgIwuUsRDcEnrZ3cvPMzYbbAwDQYJKoZIhvcNAQEL
BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV
BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy
MDgzNDM1WhcNMjIwNDEyMDgzNDM1WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB
IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGY2xp
ZW50MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwqp7yYDgemk8dmyC
NlvYPlIe4y/lqQ4M7vX8hpxr+8lBcD+eClIzrMSOTuDmbhC/PJtYO3M7kE/ZoNRm
3iEa16HkbroPuLN+bzsKeY/Xt0wdo+1+jH+SMH5d/wdDrQQhd7B+IE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uUsc1FpdnkKqJo6MAYIOnXNJebPUpHqiYRYi3SMKlXKgQJ0bI96VvI
ZRlWHhbC1WL/8al04qvOJx724eY7eK91AoIBAHKAx5kG+b7RLAk8XfiODbARZPHy
Qx/l0McTh7D0idgdpA0IDy39ebsOqxULXY3f3U2X10Oh6SpFAqSU7k2DWPoejFFt
w1wT0z+c5YnJ5TtREc8gwX5CAqawTJnjRwL3hhfIZZWmWHGM+X2XoB+vNiVR2LcI
e4WuxPY4bd4u8l4r/gSUV7WEzkk5H9ltCmFWlzB67WBXrdC7L20BZRrlKS+FYMgP
3Y8YoBjYYD8Y6bcxCpboHIyCpadlrBEtqou4r4ZWrKGEY3r5EyTXv5FJs9PA6Gp1
CLmiFKhS4HCovJBHc1I0l1eO93C8OSLcMppndw06gtAQXDy1t88LaQz0UNM=
-----END RSA PRIVATE KEY-----
67 changes: 67 additions & 0 deletions test/certificates_for_testing/mongo-test-ca-full-chain.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
-----BEGIN CERTIFICATE-----
MIIFyzCCA7OgAwIBAgIBATANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQGEwJVUzEK
MAgGA1UECAwBIDEKMAgGA1UEBwwBIDEKMAgGA1UECgwBIDETMBEGA1UECwwKbW9u
Z29fZGFydDAeFw0yMTA0MTIwODA3MzJaFw0yMzA0MTIwODA3MzJaMFIxCzAJBgNV
BAYTAlVTMQowCAYDVQQIDAEgMQowCAYDVQQHDAEgMQowCAYDVQQKDAEgMRMwEQYD
VQQLDAptb25nb19kYXJ0MQowCAYDVQQDDAEgMIICIjANBgkqhkiG9w0BAQEFAAOC
Ag8AMIICCgKCAgEAvsFkux4542byqU31lszADXXd+AdMeiKwfjxhu0o3IQyjqEYw
GUg+cOeIY7P8ot6tvqA7koQUp86cp1owO0ELo3QjeitPS+JFsGqiRcaeMPmlzNUl
QqVEs8Lc+fUOATJfEQGzhjSzAPi0lbqJ6lbWAeCsKNfYyXyOC5TiSKVwO1GwGtw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stMEblnnhPMjZhIXwEhZdmEIi8ypXByMKEy8QJ/sn258XlUb4PiaNwPQltwzN
nINs8rLkhn5ZnABdZc+4TFM50ZJIlnqwXtyXeC3HJtXBbOwAY98X/aPQX2cmoSnU
Uwsqp42SqzMiuP5HaEUOKOBeVLcxChg2ug/3x1tD1Nx0XtwFod67RA65EoCPAOAE
bPwa9qKXDfHSqiL9+gXa3KCHnVFr3I3Ee66FrJhNkfDNZE0DKJyorK2FucJ1dqpz
bcJqORLolrgE2agtBz6EftSij9/NDelCReCAtvHhzcfP74O8ENY/xH9WfqngceDa
VqyMKwu2
-----END CERTIFICATE-----
34 changes: 34 additions & 0 deletions test/certificates_for_testing/mongo-test-ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-----BEGIN CERTIFICATE-----
MIIF0jCCA7qgAwIBAgIUYwImovUUjEASePX9a6FRZIHw+5gwDQYJKoZIhvcNAQEL
BQAwRjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV
BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQwHhcNMjEwNDEyMDgwNzA5WhcNMjYw
NDEyMDgwNzA5WjBGMQswCQYDVQQGEwJVUzEKMAgGA1UECAwBIDEKMAgGA1UEBwwB
IDEKMAgGA1UECgwBIDETMBEGA1UECwwKbW9uZ29fZGFydDCCAiIwDQYJKoZIhvcN
AQEBBQADggIPADCCAgoCggIBAMelj2OYHA8mbisWv7hjvzKlhcg/Jv/RduF84WyS
vlUZNM8bAUo5p8NE6qaq+uiWspYz4YXUD+z0Q51veOvMXvuID/xn8augAhuOVxBK
t2T180qdjJAE6OAZt5wo6KlmIQn6/3Oip0IYZBMGzE/7MaBZtl6j/1Qk6KGp6//5
y7xl8n8gJX9sVAlnJMz4SY9rE5rJgK8vSfGBxty+lrKrxNA//Yzac8Cf2NCJojKa
OFgKuno9rmTfGQNlKc4qeEpsLotLyFMCdiI9CIiK5xqM9YqfOY2MfKIolvI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y8QJ/sn258XlUb4PiaNwPQltwzN
nINs8rLkhn5ZnABdZc+4TFM50ZJIlnqwXtyXeC3HJtXBbOwAY98X/aPQX2cmoSnU
Uwsqp42SqzMiuP5HaEUOKOBeVLcxChg2ug/3x1tD1Nx0XtwFod67RA65EoCPAOAE
bPwa9qKXDfHSqiL9+gXa3KCHnVFr3I3Ee66FrJhNkfDNZE0DKJyorK2FucJ1dqpz
bcJqORLolrgE2agtBz6EftSij9/NDelCReCAtvHhzcfP74O8ENY/xH9WfqngceDa
VqyMKwu2
-----END CERTIFICATE-----
Loading

0 comments on commit 752a200

Please sign in to comment.