From 752a2005b2d19d94143aa07485c90c34ae5bad4b Mon Sep 17 00:00:00 2001 From: Giorgio Date: Mon, 12 Apr 2021 17:38:50 +0200 Subject: [PATCH] Fixed tlsCAFile problem if passed more than once --- CHANGELOG.md | 4 + lib/mongo_dart.dart | 2 +- lib/src/network/connection.dart | 18 ++- pubspec.yaml | 2 +- .../certificates_for_testing/client.mongo.crt | 33 +++++ .../certificates_for_testing/client.mongo.key | 51 ++++++++ .../certificates_for_testing/client.mongo.pem | 84 ++++++++++++ .../mongo-test-ca-full-chain.crt | 67 ++++++++++ .../mongo-test-ca.crt | 34 +++++ .../mongo-test-ca.key | 51 ++++++++ .../mongo-test-ia.crt | 33 +++++ .../mongo-test-ia.key | 51 ++++++++ test/certificates_for_testing/server1.crt | 34 +++++ test/certificates_for_testing/server1.key | 51 ++++++++ test/certificates_for_testing/server1.pem | 85 ++++++++++++ test/certificates_for_testing/server2.crt | 34 +++++ test/certificates_for_testing/server2.key | 51 ++++++++ test/certificates_for_testing/server2.pem | 85 ++++++++++++ test/certificates_for_testing/server3.crt | 34 +++++ test/certificates_for_testing/server3.key | 51 ++++++++ test/certificates_for_testing/server3.pem | 85 ++++++++++++ test/certificates_for_testing/server4.crt | 34 +++++ test/certificates_for_testing/server4.key | 51 ++++++++ test/certificates_for_testing/server4.pem | 85 ++++++++++++ test/certificates_for_testing/server5.crt | 34 +++++ test/certificates_for_testing/server5.key | 51 ++++++++ test/certificates_for_testing/server5.pem | 85 ++++++++++++ test/client_certificate_test_manual.dart | 122 ++++++++++++++++++ test/server_certificate_test_manual.dart | 81 ++++++++++++ 29 files changed, 1480 insertions(+), 3 deletions(-) create mode 100644 test/certificates_for_testing/client.mongo.crt create mode 100644 test/certificates_for_testing/client.mongo.key create mode 100644 test/certificates_for_testing/client.mongo.pem create mode 100644 test/certificates_for_testing/mongo-test-ca-full-chain.crt create mode 100644 test/certificates_for_testing/mongo-test-ca.crt create mode 100644 test/certificates_for_testing/mongo-test-ca.key create mode 100644 test/certificates_for_testing/mongo-test-ia.crt create mode 100644 test/certificates_for_testing/mongo-test-ia.key create mode 100644 test/certificates_for_testing/server1.crt create mode 100644 test/certificates_for_testing/server1.key create mode 100644 test/certificates_for_testing/server1.pem create mode 100644 test/certificates_for_testing/server2.crt create mode 100644 test/certificates_for_testing/server2.key create mode 100644 test/certificates_for_testing/server2.pem create mode 100644 test/certificates_for_testing/server3.crt create mode 100644 test/certificates_for_testing/server3.key create mode 100644 test/certificates_for_testing/server3.pem create mode 100644 test/certificates_for_testing/server4.crt create mode 100644 test/certificates_for_testing/server4.key create mode 100644 test/certificates_for_testing/server4.pem create mode 100644 test/certificates_for_testing/server5.crt create mode 100644 test/certificates_for_testing/server5.key create mode 100644 test/certificates_for_testing/server5.pem create mode 100644 test/client_certificate_test_manual.dart create mode 100644 test/server_certificate_test_manual.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index eb781cba..3834aa69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/mongo_dart.dart b/lib/mongo_dart.dart index cc86b375..40883a5c 100644 --- a/lib/mongo_dart.dart +++ b/lib/mongo_dart.dart @@ -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'; diff --git a/lib/src/network/connection.dart b/lib/src/network/connection.dart index ad55299e..87e170b4 100644 --- a/lib/src/network/connection.dart +++ b/lib/src/network/connection.dart @@ -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 { @@ -65,6 +67,7 @@ class _ServerCapabilities { } class Connection { + static bool _caCertificateAlreadyInHash = false; final Logger _log = Logger('Connection'); final _ConnectionManager _manager; ServerConfig serverConfig; @@ -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!); } @@ -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; diff --git a/pubspec.yaml b/pubspec.yaml index 923180f7..68a0c87a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 diff --git a/test/certificates_for_testing/client.mongo.crt b/test/certificates_for_testing/client.mongo.crt new file mode 100644 index 00000000..c21c8bce --- /dev/null +++ b/test/certificates_for_testing/client.mongo.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgIUVB4ZgIwuUsRDcEnrZ3cvPMzYbbAwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwH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ggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggIBAAydIVGa +uqbzC0Fo88cV+16BbCluhWxdP/syMNGqP0OrblSGMagrkvQKBJSppEjX1dfL7DOm +/9oF0s37gwKUDa1mkOnh90hAdd3+/JCgAN39o5HapfLet6h/PepgTc8oZSyCsaAC +N2K7myUWuqHehJR5+lefQXqPbF1JrfyZgxuHXGzZ8hpMUPqHsJRNeMXhS+ytXSvL +jP8cIs2AxVfzxO0nmzpYNIEC+u4eVXYk97l/mCQ/RKaoSFv4eb5Rm2LbHLni4Cqq +ls5m2GeJJQ2v1dhgkHFWO5KaQTReaFNuwAV72mT86kqmkiS/rk2JLmHMwlfKFbbB +hZI+EPdA8rfaB+u/gn8UiFlZqwCwnx4YQv3bN/RwECMf1vnGwQd6761koptJFhVr +9ayva5L7lSR/hxjX/b5ohkChR3ttes34bBuo+7/EvBYZtHwiziUeRGyd90TCcBrP +fDe8gR1LuTmnhNqwOpUdXob4lJ5/vKcIh4AZI0k+lyJG/193CLAWAaDVLtX8QU4l +YM+PukfrdXVllLzfOFiBfbSOrXkDbvXe00zBLPizUPpMLJkGB7Farn9qq4wYrJvk +RHm/pX8T8l90Sd8uDz0Q77tYKujaJtbosV0xzJ2yN+OISLtXB22KXCMJx7M+M4Wo +pIDRd6PW/qx+i8Cx7Wf1Lv9ZFWfm7sjWbZeI +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/client.mongo.key b/test/certificates_for_testing/client.mongo.key new file mode 100644 index 00000000..accb136f --- /dev/null +++ b/test/certificates_for_testing/client.mongo.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAwqp7yYDgemk8dmyCNlvYPlIe4y/lqQ4M7vX8hpxr+8lBcD+e +ClIzrMSOTuDmbhC/PJtYO3M7kE/ZoNRm3iEa16HkbroPuLN+bzsKeY/Xt0wdo+1+ +jH+SMH5d/wdDrQQhd7B+IEJP80HORd65wrkPL55rInm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D/xjmFSiDSJgH8obDRsgKmc/LMWzJ0TFq/Gkvj+gBQl+4Ar3vSBDfPs +MidhpS3IZAwibmEpP/IoV413+k6DXrrBp490pyAIZMeX3mRbzt9B2BDRgxHuZX+z +KAxCnInU/RwGIg36UiD732gn+lR2hxJnVO0pEm845xRm6mPO9Z71NPOlZGvNGNwF +P3nYoQKCAQAe55FbnSQ6pqfU5a3YLZf78KSPQ8hfjPddkWt2C5uRM2KXiALguTzO +U+nJhkNe1xTEsFTd5bBVQjq+gINW/9Kczp04HNgKfzglKGT3pdHpqwuANeMcnH5l +MRUt5mELWGSE5PprMsvOlMb4m4u+53tSdxRkHjjxCfHcMZJqiiB+29+oerFHkP8f +vukduf9g0hcVQg32Saa7L4H7V+o2O7VCTQL0LkweZol7rA0CDJ5DGdd3QJVel8Da +Fv5gZ8RZDnuUsc1FpdnkKqJo6MAYIOnXNJebPUpHqiYRYi3SMKlXKgQJ0bI96VvI +ZRlWHhbC1WL/8al04qvOJx724eY7eK91AoIBAHKAx5kG+b7RLAk8XfiODbARZPHy +Qx/l0McTh7D0idgdpA0IDy39ebsOqxULXY3f3U2X10Oh6SpFAqSU7k2DWPoejFFt +w1wT0z+c5YnJ5TtREc8gwX5CAqawTJnjRwL3hhfIZZWmWHGM+X2XoB+vNiVR2LcI +e4WuxPY4bd4u8l4r/gSUV7WEzkk5H9ltCmFWlzB67WBXrdC7L20BZRrlKS+FYMgP +3Y8YoBjYYD8Y6bcxCpboHIyCpadlrBEtqou4r4ZWrKGEY3r5EyTXv5FJs9PA6Gp1 +CLmiFKhS4HCovJBHc1I0l1eO93C8OSLcMppndw06gtAQXDy1t88LaQz0UNM= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/client.mongo.pem b/test/certificates_for_testing/client.mongo.pem new file mode 100644 index 00000000..775a6d56 --- /dev/null +++ b/test/certificates_for_testing/client.mongo.pem @@ -0,0 +1,84 @@ +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgIUV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G4ZfXDYH/AaNTVt/gAely0mhVXu0w+cB3+u75MG5CT +8rw7FU6VBD/xjmFSiDSJgH8obDRsgKmc/LMWzJ0TFq/Gkvj+gBQl+4Ar3vSBDfPs +MidhpS3IZAwibmEpP/IoV413+k6DXrrBp490pyAIZMeX3mRbzt9B2BDRgxHuZX+z +KAxCnInU/RwGIg36UiD732gn+lR2hxJnVO0pEm845xRm6mPO9Z71NPOlZGvNGNwF +P3nYoQKCAQAe55FbnSQ6pqfU5a3YLZf78KSPQ8hfjPddkWt2C5uRM2KXiALguTzO +U+nJhkNe1xTEsFTd5bBVQjq+gINW/9Kczp04HNgKfzglKGT3pdHpqwuANeMcnH5l +MRUt5mELWGSE5PprMsvOlMb4m4u+53tSdxRkHjjxCfHcMZJqiiB+29+oerFHkP8f +vukduf9g0hcVQg32Saa7L4H7V+o2O7VCTQL0LkweZol7rA0CDJ5DGdd3QJVel8Da +Fv5gZ8RZDnuUsc1FpdnkKqJo6MAYIOnXNJebPUpHqiYRYi3SMKlXKgQJ0bI96VvI +ZRlWHhbC1WL/8al04qvOJx724eY7eK91AoIBAHKAx5kG+b7RLAk8XfiODbARZPHy +Qx/l0McTh7D0idgdpA0IDy39ebsOqxULXY3f3U2X10Oh6SpFAqSU7k2DWPoejFFt +w1wT0z+c5YnJ5TtREc8gwX5CAqawTJnjRwL3hhfIZZWmWHGM+X2XoB+vNiVR2LcI +e4WuxPY4bd4u8l4r/gSUV7WEzkk5H9ltCmFWlzB67WBXrdC7L20BZRrlKS+FYMgP +3Y8YoBjYYD8Y6bcxCpboHIyCpadlrBEtqou4r4ZWrKGEY3r5EyTXv5FJs9PA6Gp1 +CLmiFKhS4HCovJBHc1I0l1eO93C8OSLcMppndw06gtAQXDy1t88LaQz0UNM= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/mongo-test-ca-full-chain.crt b/test/certificates_for_testing/mongo-test-ca-full-chain.crt new file mode 100644 index 00000000..2fd0c3ec --- /dev/null +++ b/test/certificates_for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1UdEwEB/wQFMAMBAf8wgYEGA1UdIwR6MHiAFC/tSt2GlwVkrd1RS4v6X/lAvOYx +oUqkSDBGMQswCQYDVQQGEwJVUzEKMAgGA1UECAwBIDEKMAgGA1UEBwwBIDEKMAgG +A1UECgwBIDETMBEGA1UECwwKbW9uZ29fZGFydIIUYwImovUUjEASePX9a6FRZIHw ++5gwDQYJKoZIhvcNAQELBQADggIBAG+7jJnxi4dvGEnmUMc7/ftwlQWdOG1kOBSU +czYtU+JluImdG4UYCpbcz0uSv+qxLUPZssSyBHl6i04y2UbJIlBI2iq6UP/3s822 +9iPij0T2COTRmQk2AOMU6EqZElS02o8xJSO/OynPKCzWPtU1eby4WOZzjXzaV+5V +1zSz3eXs53l/Jc742jmhCneo3IlhEqojwGXqbz7JaPT3DK1Na7+mZg1RZSyf/qj0 +A7xl++6Rpyk9hoyhIimWvWggb5d9dMTprIYzFlYQzcTzhW89Ao835GBcqDPL8/6q +BkM99vfMUU1WrUNpYaZPDijAJUJib4H3oxZ5IpUwWuk5Mnmkpn6L+E1qkZXj3F1F +z6bstMEblnnhPMjZhIXwEhZdmEIi8ypXByMKEy8QJ/sn258XlUb4PiaNwPQltwzN +nINs8rLkhn5ZnABdZc+4TFM50ZJIlnqwXtyXeC3HJtXBbOwAY98X/aPQX2cmoSnU +Uwsqp42SqzMiuP5HaEUOKOBeVLcxChg2ug/3x1tD1Nx0XtwFod67RA65EoCPAOAE +bPwa9qKXDfHSqiL9+gXa3KCHnVFr3I3Ee66FrJhNkfDNZE0DKJyorK2FucJ1dqpz +bcJqORLolrgE2agtBz6EftSij9/NDelCReCAtvHhzcfP74O8ENY/xH9WfqngceDa +VqyMKwu2 +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/mongo-test-ca.crt b/test/certificates_for_testing/mongo-test-ca.crt new file mode 100644 index 00000000..82e7d5bd --- /dev/null +++ b/test/certificates_for_testing/mongo-test-ca.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0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wVkrd1RS4v6X/lAvOYxMA8G +A1UdEwEB/wQFMAMBAf8wgYEGA1UdIwR6MHiAFC/tSt2GlwVkrd1RS4v6X/lAvOYx +oUqkSDBGMQswCQYDVQQGEwJVUzEKMAgGA1UECAwBIDEKMAgGA1UEBwwBIDEKMAgG +A1UECgwBIDETMBEGA1UECwwKbW9uZ29fZGFydIIUYwImovUUjEASePX9a6FRZIHw ++5gwDQYJKoZIhvcNAQELBQADggIBAG+7jJnxi4dvGEnmUMc7/ftwlQWdOG1kOBSU +czYtU+JluImdG4UYCpbcz0uSv+qxLUPZssSyBHl6i04y2UbJIlBI2iq6UP/3s822 +9iPij0T2COTRmQk2AOMU6EqZElS02o8xJSO/OynPKCzWPtU1eby4WOZzjXzaV+5V +1zSz3eXs53l/Jc742jmhCneo3IlhEqojwGXqbz7JaPT3DK1Na7+mZg1RZSyf/qj0 +A7xl++6Rpyk9hoyhIimWvWggb5d9dMTprIYzFlYQzcTzhW89Ao835GBcqDPL8/6q +BkM99vfMUU1WrUNpYaZPDijAJUJib4H3oxZ5IpUwWuk5Mnmkpn6L+E1qkZXj3F1F +z6bstMEblnnhPMjZhIXwEhZdmEIi8ypXByMKEy8QJ/sn258XlUb4PiaNwPQltwzN +nINs8rLkhn5ZnABdZc+4TFM50ZJIlnqwXtyXeC3HJtXBbOwAY98X/aPQX2cmoSnU +Uwsqp42SqzMiuP5HaEUOKOBeVLcxChg2ug/3x1tD1Nx0XtwFod67RA65EoCPAOAE +bPwa9qKXDfHSqiL9+gXa3KCHnVFr3I3Ee66FrJhNkfDNZE0DKJyorK2FucJ1dqpz +bcJqORLolrgE2agtBz6EftSij9/NDelCReCAtvHhzcfP74O8ENY/xH9WfqngceDa +VqyMKwu2 +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/mongo-test-ca.key b/test/certificates_for_testing/mongo-test-ca.key new file mode 100644 index 00000000..afac6c51 --- /dev/null +++ b/test/certificates_for_testing/mongo-test-ca.key @@ -0,0 +1,51 @@ +-----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KCAQEA0M3iflIOn87cGjDr +2LIasEiE38SzuC5fFK+uPozaXcGhdd5/JEIiwsmaEWa7O+/1KyXVH34Gbay43bJ9 +2My+YNdUorUgliaGbAa7nUgLIM/pzxM6czUB26wC4KTQzoByV5+xCHv86d3Q4OTi +33va/5heviYZohGtjOEWgN6BJgkWM3IB78G5BZDTidmZe0sYq7Qs6zkdZAf8IDQg +vvUCq13JtthIrCptTArrlY5hZ0gvmngGGKUb+FJWPvWK+qeNMi5OMlz/+8FcVCoB +OXG+1fpMsL7rvj4ySFJgOHUhm+5olsl3GFT8ACdhx3mA3Ahmtp3W07k8OA2Bt5f6 +y8IiCQKCAQEAv64JTAYHcBn5LNKknQbnim1jfmM+xp+UBqApsMz5ZUsuX5e1T4GB +GvcxaQA+yDr0FqDDqWzk2N51IrlAtbR/fW6/3CnQzGbim3JnwRZcmHl+xPoDIZWR +3DcMTipTAliliPQPfrPLSWD4yNCq++IJTOtZtDmJyx1lzgldqdtGELq48zb8Xpqu +0BzUk/XdlCNZHIoBW86YhoQ4EnklzEFPnK3trQBuUINaAvbjM8esTMMmdwT/dGzD +lLYfCWNTlfdXsla/+iOQoJlcuT+XNCfdYeBchCK0qcNYm9B/KdP0br3KPDh1BnfB +PBXLoEJJmdfSNcZfrMmVrup0l/MaLqaZ6QKCAQBKj8t3QdCPr6EComIT+P42KEen +0/6CwVsa99aPG3kiNIxAs9OnYK/Jpnln1QFiJvEroS8xciLek+QHW4XGQil56HJF +eW7t/My9/TmvFp1XFI4D5x9jy3YrbfU7TqpVmaTD8wxiWqTRzQpwY7NqI1b8cZ/R +D9aKiwBkgwCpPE+jYaZEBvyeCIq+eSPWP2/CDGqFcQWMRaa3M03OblrnE9y/bTEm +M9Nnlyr28D//LysFLsX26FlusrVTG+LnIKhgDUos20VSjKNtH7ELynKV0FxjkObU +/35UyxlLfhxji1mCAaKe63al69za+ic6yV0JubrVjKs1eeYt0RzxZVzt2TPH +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/mongo-test-ia.crt b/test/certificates_for_testing/mongo-test-ia.crt new file mode 100644 index 00000000..3929a34f --- /dev/null +++ b/test/certificates_for_testing/mongo-test-ia.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFyzCCA7OgAwIBAgIBATANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQGEwJVUzEK +MAgGA1UECAwBIDEKMAgGA1UEBwwBIDEKMAgGA1UECgwBIDETMBEGA1UECwwKbW9u +Z29fZGFydDAeFw0yMTA0MTIwODA3MzJaFw0yMzA0MTIwODA3MzJaMFIxCzAJBgNV +BAYTAlVTMQowCAYDVQQIDAEgMQowCAYDVQQHDAEgMQowCAYDVQQKDAEgMRMwEQYD +VQQLDAptb25nb19kYXJ0MQowCAYDVQQDDAEgMIICIjANBgkqhkiG9w0BAQEFAAOC +Ag8AMIICCgKCAgEAvsFkux4542byqU31lszADXXd+AdMeiKwfjxhu0o3IQyjqEYw +GUg+cOeIY7P8ot6tvqA7koQUp86cp1owO0ELo3QjeitPS+JFsGqiRcaeMPmlzNUl +QqVEs8Lc+fUOATJfEQGzhjSzAPi0lbqJ6lbWAeCsKNfYyXyOC5TiSKVwO1GwGtw+ +mTJLVvmuBH9rTTqawJTEjLMTM0s8eCOZKPu6Kyc4+/V+ceoj4H5YFWllO+yB5kpb +Lz5kWBV2d5FfOu7AENzVsygVRv4BIyUYqy5lVYsserRd44KkSqtg9sJaQ9k0L/Ox +KGjhM3aP2J++lLdCrpNtr/1msSfzVy8RCt4rbY5Sy2qvppAh3HnhfQr+WuaxMYDJ +5Fayt6KeF2ZayLHynDTAoK1xZPC/fmeF+ZIO/xgpYOOMwtr3FTiOJOxcnoGugbS2 +OR8ECNRILgoZvdTxPBR+QiUIdGL/QhMBDYf9rYwOZjUYv6HhlgM2ibcu1qmW2Sz1 +rjSJDPP5CysdjJviMST5nj8kvXcwT88HyjxFnqctQyxN8vQ3IDAuyes1sTBUyJ0B +dJr9IbeGun1ihVioRFrMinJfq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oa7qlqT48= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/mongo-test-ia.key b/test/certificates_for_testing/mongo-test-ia.key new file mode 100644 index 00000000..00698dec --- /dev/null +++ b/test/certificates_for_testing/mongo-test-ia.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAvsFkux4542byqU31lszADXXd+AdMeiKwfjxhu0o3IQyjqEYw +GUg+cOeIY7P8ot6tvqA7koQUp86cp1owO0ELo3QjeitPS+JFsGqiRcaeMPmlzNUl +QqVEs8Lc+fUOATJfEQGzhjSzAPi0lbqJ6lbWAeCsKNfYyXyOC5TiSKVwO1GwGtw+ +mTJLVvmuBH9rTTqawJTEjLMTM0s8eCOZKPu6Kyc4+/V+ceoj4H5YFWllO+yB5kpb +Lz5kWBV2d5FfOu7AENzVsygVRv4BIyUYqy5lVYsserRd44KkSqtg9sJaQ9k0L/Ox +KGjhM3aP2J++lLdCrpNtr/1msSfzVy8RCt4rbY5Sy2qvppAh3HnhfQr+WuaxMYDJ +5Fayt6KeF2ZayLHynDTAoK1xZPC/fmeF+ZIO/xgpYOOMwtr3FTiOJOxcnoGugbS2 +OR8ECNRILgoZvdTxPBR+QiUIdGL/QhMBDYf9rYwOZjUYv6HhlgM2ibcu1qmW2Sz1 +rjSJDPP5CysdjJviMST5nj8kvXcwT88HyjxFnqctQyxN8vQ3IDAuyes1sTBUyJ0B +dJr9IbeGun1ihVioRFrMinJfqb/m3sfEw1bH6++xvf4Ao4Zm1DjF0M6aJLtyipfg +J7MsWJ/YxqyyqkjR/QEePzlKFoTa2CPxPIIybiNyVCAq0HPShiu/fPoMkNMCAwEA +AQKCAgAW1wMfoHvf7YiqmuoH91YbhnxgYUdX7GVjiAlPqpA1RdUmpdjGfi7zx9U9 +0uQyACWfiIH5hhUPDp8VLqhNv/kLxjElRKBG/r3HZM0vO5vfU1T11KOUekNinrdk +umHF5OkbGTAMpqy0NhMxRleTFnijWupiLY4IegBsBJSfjCe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3JaZNjUfi//K1 +UvtlMWz/z0a17bYffO15X0A2TVYcGIBEzyGSNmrhCuz2INQosCmskAteM1ag1aQS +0T/bkWc9bS0xO4x4XaVzn8IRvTB45LuoNlaZ52VdEH9C/QYp+UEvdeKG1Hk= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server1.crt b/test/certificates_for_testing/server1.crt new file mode 100644 index 00000000..e2df5916 --- /dev/null +++ b/test/certificates_for_testing/server1.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUdwrcVZ0islY1L9LvyIDDKsKPY6UwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMDQ5WhcNMjIwNDEyMDgzMDQ5WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsjKvJx1IdGmvWEl4 +m230WSVofcPQ1k1ijXT2V5S8yb3WwmEmArln2JFcrtqQ0gqACMDT3qs8RMvSuApM +ii7pOQDXCMHc5F2wDOYTw7qvDnH1ysl3WNazL4dV8XvpznPs/uoX41B9kkSkCBwq +JZia/LZI/s71Q25WdWNMfDlQg4zyVfzfwam2VNGPYhagDv5cdtD09MfZpwRGTj69 +BJLHMbsDxoTaZjfXzEDKVsCz/pj4/Mjf/CuSVur6jh1RCCg7/2T6AF8kwzQNz6Rz +LQpCo9HIfe8I3NLGmWYtWjrG82HI178ZcVwZFdIGOL1p762qc50IuY4FPPdpPSAZ +ApXHejsCqM/yriB5ca1wTssMObAk7hIpBl2hy8X2CuU00PeA+iDOioTDu4A5V+x7 +Xadn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aw+rMB2GNfMC+L12E1eI8pwOqs8vVd1rwNYBmb85+DSx3wTfDU +9LrbdcxGJCDEwr8cqmfwKBAd3wPiKSS+6GdAHV1d9uuZnAJV1W40Oqkp9X0Hq7c4 +0y54HB7QrMOF/crG1oS1Cu/lMlUOqVnXOKzKidRaHc5SDua7qu4Ks9wy9fAEa/0b +VDsKlfw= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/server1.key b/test/certificates_for_testing/server1.key new file mode 100644 index 00000000..32b93e7b --- /dev/null +++ b/test/certificates_for_testing/server1.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKgIBAAKCAgEAsjKvJx1IdGmvWEl4m230WSVofcPQ1k1ijXT2V5S8yb3WwmEm +Arln2JFcrtqQ0gqACMDT3qs8RMvSuApMii7pOQDXCMHc5F2wDOYTw7qvDnH1ysl3 +WNazL4dV8XvpznPs/uoX41B9kkSkCBwqJZia/LZI/s71Q25WdWNMfDlQg4zyVfzf +wam2VNGPYhagDv5cdtD09MfZpwRGTj69BJLHMbsDxoTaZjfXzEDKVsCz/pj4/Mjf +/CuSVur6jh1RCCg7/2T6AF8kwzQNz6RzLQpCo9HIfe8I3NLGmWYtWjrG82HI178Z +cVwZFdIGOL1p762qc50IuY4FPPdpPSAZApXHejsCqM/yriB5ca1wTssMObAk7hIp +Bl2hy8X2CuU00PeA+iDOioTDu4A5V+x7Xadnrx1lGBEdpBtKsxU8f46eH1P6FFvG +Q/q2QYN5PBZyZ0dV4snAfsmCnmRo4MO6Lwv9w2AsS9YBvpHTKZESTtRJY5KbOl1U +LS/TAbHrxs68hibAiEisJpbNKoKJWt2oTiHBdTKENrsJTS0iYQ+Z43es+IJfy4Q9 +G0t5/tuqJJ/xDDi/dh0KKS9W+hQyN7guFEM4Q2nklFkUVQa29SL+UO2dWUmFziNc +LjYyFMS8JhICe62bgdnoanN/12SufmSvvMIypCSgJcdhOfuHmLm4XbqQe1UCAwEA +AQKCAgB7TDqJE+foNKA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CdBfNRjhfzGqkKs2cwiTSq+64k2nuRzmzV3kfFlXlacD8s5ZdbnF/7CjmU7nj +0fzHR3Yrc22t+Ni7lKzyXLsxZ27u666xSmkrPUqU4drfI57JcowkEl/e9vGEBQgm +14Yzkj681tT1v6erZXDHfihYy196XWLr+eGOFqWtk7fRcATbu+pXZURN6uEcMFH3 +9FmoOpwDf6OeQ3aoXm5lwIs+tMLIuHVuiwK5RnqmsZkkzvgATQj2sDTfnkbHA9+H +Z36pk+SoUqurbXwVlHVZtfhNgwY0E6iUlw8siG0ANByue4C1dXL8+mUza/4mIA== +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server1.pem b/test/certificates_for_testing/server1.pem new file mode 100644 index 00000000..5ca5e03d --- /dev/null +++ b/test/certificates_for_testing/server1.pem @@ -0,0 +1,85 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUdwrcVZ0islY1L9LvyIDDKsKPY6UwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMDQ5WhcNMjIwNDEyMDgzMDQ5WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsjKvJx1IdGmvWEl4 +m230WSVofcPQ1k1ijXT2V5S8yb3WwmEmArln2JFcrtqQ0gqACMDT3qs8RMvSuApM +ii7pOQDXCMHc5F2wDOYTw7qvDnH1ysl3WNazL4dV8XvpznPs/uoX41B9kkSkCBwq +JZia/LZI/s71Q25WdWNMfDlQg4zyVfzfwam2VNGPYhagDv5cdtD09MfZpwRGTj69 +BJLHMbsDxoTaZjfXzED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x +zJuTbE/Ydb3Nkk2XU1tvxgoBDt45LyPnkQKCAQEA3FMKvN5ODm0wcb8G2oAQbz4d +6c1CdBfNRjhfzGqkKs2cwiTSq+64k2nuRzmzV3kfFlXlacD8s5ZdbnF/7CjmU7nj +0fzHR3Yrc22t+Ni7lKzyXLsxZ27u666xSmkrPUqU4drfI57JcowkEl/e9vGEBQgm +14Yzkj681tT1v6erZXDHfihYy196XWLr+eGOFqWtk7fRcATbu+pXZURN6uEcMFH3 +9FmoOpwDf6OeQ3aoXm5lwIs+tMLIuHVuiwK5RnqmsZkkzvgATQj2sDTfnkbHA9+H +Z36pk+SoUqurbXwVlHVZtfhNgwY0E6iUlw8siG0ANByue4C1dXL8+mUza/4mIA== +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server2.crt b/test/certificates_for_testing/server2.crt new file mode 100644 index 00000000..9b201072 --- /dev/null +++ b/test/certificates_for_testing/server2.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUIQTowRc0qTzP9TwpNP1UcmjYZ3kwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMTI1WhcNMjIwNDEyMDgzMTI1WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxY1+sVg9rbwlYhk2 +jID7w5XbrVXvsv7NgElVnfL9HAfWT+Mamnq02OKzmPsfs/DcVkUx+yitOmeyZWPA +g1VZ2R1rfLe7KnaTVzzih5OhrPzKI1yLDim8cJRB20qpDECW5Ha24q6q9zoUO8k6 +vXNTj/vPS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4ibadxiLHL5TJ+JyqT6tzrjsWKb3/JWQY1 +9tBoz2mV8k4wvPEM5NJUy9PyFtOno8c9+HOBnUxckrw8DNRLqZAAYnrpQwov5GXZ +T8kDjWuX4hmRHJBD0iuIOxiH6VObHxUnxCzOQdA+xGzngCZr+fEYTJFazAJkI+qo +zitdOTiXnERiV+gr4apuA0OhHMJoxQOARCe6LfPrFY4AsevOAXmK52mVZQdTZn/Y +Se82t+2PC4WEbYlE3ftAJsfqgsytM7niSKSM/RyLdGWChqPFQ8tcs8mglp8mxMYH +H15ThAa6hDGaIVl7ziWn+Px7Gv60alqojkhykSvlV/tZC+V0Qw8jXkWt94xZ1/wp +29axFXkifwRKoBAjLZIp8drRspDBQPKAa80wj1nq4IYaN+YI5AR825Af4MivWPrf +KliX0D4= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/server2.key b/test/certificates_for_testing/server2.key new file mode 100644 index 00000000..ad8a7287 --- /dev/null +++ b/test/certificates_for_testing/server2.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKgIBAAKCAgEAxY1+sVg9rbwlYhk2jID7w5XbrVXvsv7NgElVnfL9HAfWT+Ma +mnq02OKzmPsfs/DcVkUx+yitOmeyZWPAg1VZ2R1rfLe7KnaTVzzih5OhrPzKI1yL +Dim8cJRB20qpDECW5Ha24q6q9zoUO8k6vXNTj/vPSCbpz7OSuWoZdlTo5Iw5fRl0 +zN55fGH6Rt2QGv6A0lh7mh8i5tqdBFQkcnVxbZHqmtF8LbpNPZdFgRqHD2Qk6/NP +nAR84EcZx1kpoYls8zbf2ISLJ5tD1JJ3ODLdL8VD7fknLwNnzXQ8nyvrWP7wyyXD +SQEky3gxZckpAt6Vb4W+VJPDJWD/PQSfoz8oh+8O9c2ySf+iZYQ2vT5KPxwJ+DD6 +VJcH98cF79sJMQyD+ClRIlhgMTP482mx7X8ieCb3Np1Ra4fr4xCDW6KUpC5ZUtyz +or6tC9gDJjwqZQ0sISbNGJl94S8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u/NF1cVAJXEm3B94dlA21SZNbjKn1SoHPQbWu1hOeo7Y8s9 +ffXWgAgxjplJDEgF3WMGHwqO8x1GlYH5dJ8/WDONy9OiixpEMdR1EVAzVlLcwfti +GuYPAhTHo8hNVTZCmhS3ptJBNVtXJU0tAmVUeJP6FY6aaGA1BgIIv0Wu7uzsQZAd +e1I6uFM+DGZQjVxYLMiy1hRg8GnBiBUPPQKCAQEA2/GC0nwr1bFevtht4O/Kk1bR +/I1ZmeZDMkHwgcfrfd8p0nXuLWJ8zdLWj/bM0WxWqxkNauJzMIbkmLm91UwK4d5B +V7dRGYUu2Kh3fdj0SWY1uWBA+QPOrQcbzIbEyZ15J8gsdsR89bvPlAVzoChU/SPK +7BhO/H4sUQP3dVXKlCm7O4uGEojxmlJ52X9p110ukiwmVp+ozuaRsjstWN6B5Qr4 +aoAVUFc0GgEb9rOA5vwZsuz8bBCkfzI+acbL7t6I7g2O9jPz/jN0xAfS7YIkDvcT +JE/cvtb8cFxP8ctMI+i8D8T9CmBUjgJF4OhiQV8Yd3xac+5UIfHiFALbuEcXcA== +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server2.pem b/test/certificates_for_testing/server2.pem new file mode 100644 index 00000000..6b990056 --- /dev/null +++ b/test/certificates_for_testing/server2.pem @@ -0,0 +1,85 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUIQTowRc0qTzP9TwpNP1UcmjYZ3kwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMTI1WhcNMjIwNDEyMDgzMTI1WjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBg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DrMo4Geo4XKSo2d53fxdlbmZRkA0QFyUgfkjqmjRyJvz2L4JUFUrtp/xFLWNOK7s +1NC9xGEJsQoQ4+vAgu/NF1cVAJXEm3B94dlA21SZNbjKn1SoHPQbWu1hOeo7Y8s9 +ffXWgAgxjplJDEgF3WMGHwqO8x1GlYH5dJ8/WDONy9OiixpEMdR1EVAzVlLcwfti +GuYPAhTHo8hNVTZCmhS3ptJBNVtXJU0tAmVUeJP6FY6aaGA1BgIIv0Wu7uzsQZAd +e1I6uFM+DGZQjVxYLMiy1hRg8GnBiBUPPQKCAQEA2/GC0nwr1bFevtht4O/Kk1bR +/I1ZmeZDMkHwgcfrfd8p0nXuLWJ8zdLWj/bM0WxWqxkNauJzMIbkmLm91UwK4d5B +V7dRGYUu2Kh3fdj0SWY1uWBA+QPOrQcbzIbEyZ15J8gsdsR89bvPlAVzoChU/SPK +7BhO/H4sUQP3dVXKlCm7O4uGEojxmlJ52X9p110ukiwmVp+ozuaRsjstWN6B5Qr4 +aoAVUFc0GgEb9rOA5vwZsuz8bBCkfzI+acbL7t6I7g2O9jPz/jN0xAfS7YIkDvcT +JE/cvtb8cFxP8ctMI+i8D8T9CmBUjgJF4OhiQV8Yd3xac+5UIfHiFALbuEcXcA== +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server3.crt b/test/certificates_for_testing/server3.crt new file mode 100644 index 00000000..36117aaf --- /dev/null +++ b/test/certificates_for_testing/server3.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUSg+h44kc3133fYiNmPgm7r2UFHgwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMTU0WhcNMjIwNDEyMDgzMTU0WjBLMQswCQYDVQQGEwJVUzEKMAgGA1U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CAgEAjxZtKi+2hu5EE4SzsQjR/YzT7JJjB8gZwwFj +B6kfJbKtoArjiOjFFDwrjooGaE4/u+YUv/RoeztZF8Ha8fbIsdnS1LgLi/4MRBHk +HpSUggu/93wldoHu/Xn/3flemiAmo5tKAPthguODAZdrsslZKWBQxPuRcAi72XOn +lcFw9DiM5VW6QZsyRUxm0aw895YfZ17ZG8MjcMy86nwG4vvwYPqiDcriLbsmuuy7 +PHATIRQwLzIQ5OALZEQTc4tOGBT3gBa8lHv81v+kK4xWArvgYcF9yXvPrIZn6/dW +Us0bImWs95fnHSNXhlvOw8BJhkplt7onHel+908MfHv82Bm41Sdihe7ntbzaAiCt +wf8iR7ImelYsr48G3qS5OAD/VgJwMmZPPnexC7ItTSZ980FheD7KxV3zxPIGm/ws +xgCXoGb+c+z9zk9Xuo356xn3wCv+zZfvqHpDRUAwwbycwSHhmurJGlt8bH0JJlON +ahz/hiSxGmXvLg7nMhKzxf6O57RnEgv+sjAmArcfvieaeElhQk5RZ2jXFKNN7pcb +0qUcyDrC0nzMl2fOCjYHNtBsCeseo4WY0WVhawSWVy8u+97sIyiXzVUb+Y5G7m3V +GRk7AYjUHgqnZVOIOYZilr/WFPUcOl+MEdcFrrCkLwWjbxX9PIZn+2PUfoAJOqAr +EyR2v3M= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/server3.key b/test/certificates_for_testing/server3.key new file mode 100644 index 00000000..f65ab2b7 --- /dev/null +++ b/test/certificates_for_testing/server3.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAmWjrx3CUCdNfhagiMbcZ8rsHMoQtKh9lmbhSobpDpM9QRoht +JSWqUqvNirpX5hDQZR4A3lHf8FYE1XONto4zhaPdoGGvlVsyvIoT7+qNz9ufstDr +qTwvQEPMPwM4oVgTlwpCuKZPye1x0L/gFQuTQ6kx/KgFx809lNh8fPB6AkTx/7Je +R+GUcbAbiVKn/j1RYldrWTGv1I1Xu8Z/UzV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InBN/nZGZLUKNpd9cowyefldiNK8b54nnxHvngxJxq0 +ied304cqzJ5Om/ulGCL5iX/fvPQFC+EsjD4KUwbBmx+eG8oWfhopj0X2eYXovohh +LpwxAoIBAQC0UCgr00pzAy3aHMg4oSQgMZdY66JxMO+2oJpsmUZQK5guDf6mIrJd +zhoKmDU74hHZvQ4KcEqqKhVGjEBMbTH5bp0tRsss7eAFma66RG/UBE9IGFKT3EHS +76HQTWzghjfXfROZGjcuTAFzx1Xya2P/hSJ+04mJiFD0OGvmr6rIdcBta7MeNWwo +yr6Khcbdm0qhTqd/U/C1gQIvoLo7/q/PGPhC12y4GTZfi4IbFt6PZ14PMrSeH9R8 +k8Mh+CHtinXy+JdrLSxXYn+tNTmIp3i8uxWoSvdRRh56C8LMVMUzPRXke0880WlW +pYizWzsA4TK6KUgDJDpZevD1qZahAmWZAoIBADhYyOtjgBCqTjbY2v00XR3gxnoU +8WhLWoJoBMHUw90u/15pNG/qYghjWKn3ErIdXNHmuJUSj+n9pNhK4PRUKf9gxrDv +pMXamPOaNzN24wIzvowBrUpSjrJ5QRFPhryUy4t68TDzqxNt0rYJlvoNX+7zhucy +W9GmoMX57Y4CjV7M66HTHA3qYKlM/mNvGcPtJ8zgqhXEnhCVSv3qPAHlo4qGQGhC +DKRDMYyZOPW4WCfZ2PdXznvNn27N7+5+vBS5Unnp80iMcrGbEAD1Ja+Z91VrpeSc +nLQdDJDjFvendno+0SEtEGWFNdt/v2ilv8rMFxMHCYaa6sDlyuuT9jLhznc= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server3.pem b/test/certificates_for_testing/server3.pem new file mode 100644 index 00000000..309d47e8 --- /dev/null +++ b/test/certificates_for_testing/server3.pem @@ -0,0 +1,85 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUSg+h44kc3133fYiNmPgm7r2UFHgwDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBg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IklNVWblC5UBDex41sBp +leeiIJskmsKWudLlWV8AcInBN/nZGZLUKNpd9cowyefldiNK8b54nnxHvngxJxq0 +ied304cqzJ5Om/ulGCL5iX/fvPQFC+EsjD4KUwbBmx+eG8oWfhopj0X2eYXovohh +LpwxAoIBAQC0UCgr00pzAy3aHMg4oSQgMZdY66JxMO+2oJpsmUZQK5guDf6mIrJd +zhoKmDU74hHZvQ4KcEqqKhVGjEBMbTH5bp0tRsss7eAFma66RG/UBE9IGFKT3EHS +76HQTWzghjfXfROZGjcuTAFzx1Xya2P/hSJ+04mJiFD0OGvmr6rIdcBta7MeNWwo +yr6Khcbdm0qhTqd/U/C1gQIvoLo7/q/PGPhC12y4GTZfi4IbFt6PZ14PMrSeH9R8 +k8Mh+CHtinXy+JdrLSxXYn+tNTmIp3i8uxWoSvdRRh56C8LMVMUzPRXke0880WlW +pYizWzsA4TK6KUgDJDpZevD1qZahAmWZAoIBADhYyOtjgBCqTjbY2v00XR3gxnoU +8WhLWoJoBMHUw90u/15pNG/qYghjWKn3ErIdXNHmuJUSj+n9pNhK4PRUKf9gxrDv +pMXamPOaNzN24wIzvowBrUpSjrJ5QRFPhryUy4t68TDzqxNt0rYJlvoNX+7zhucy +W9GmoMX57Y4CjV7M66HTHA3qYKlM/mNvGcPtJ8zgqhXEnhCVSv3qPAHlo4qGQGhC +DKRDMYyZOPW4WCfZ2PdXznvNn27N7+5+vBS5Unnp80iMcrGbEAD1Ja+Z91VrpeSc +nLQdDJDjFvendno+0SEtEGWFNdt/v2ilv8rMFxMHCYaa6sDlyuuT9jLhznc= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server4.crt b/test/certificates_for_testing/server4.crt new file mode 100644 index 00000000..4641b97b --- /dev/null +++ b/test/certificates_for_testing/server4.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUPppZoZRnGEOImm0XMRorC3oGesowDQYJKoZIhvcNAQEL +BQAwUjELMAkGA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Af8EBAMCBaAwLQYJYIZI +AYb4QgENBCAWHk9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlLjAdBgNVHSUE +FjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwGAYDVR0RBBEwD4IHc2VydmVyNIcEfwAA +ATANBgkqhkiG9w0BAQsFAAOCAgEAHaQcW/eIhtmAbxK9i3+KnehHc4hogXCR20yz +ufSOk9lCp5A+pZJ7XEMQuaHJ/vKaO7e/VQPtNYTUyKxEpIWPK0dbw4s4aWY2B3Ac +x2peX2+ZKTonzybEELEGMuBeR0fBUpGbTv0Xz9tdQXmevAiBTXu65A9hyF/SxC/V +1ud4qBsuq+CjxVq2wtZoCA0BMrXzjRBIVpg5J1IztSTdEubRn/nf433h+ykPTRtz +ro+c3GPi9DwK+096ZkJwFdRgWqZKTvfg+xI3QkzSE5ZYcGs/XYes7kmu362KQ6KE +5GPi+DAQHILsN4dmEtC3vHcw0W1qCSoKnHm8FJpI34mOaNH+BEcPq6o947u6G1iz +pSYTqw4ElXGOtIPecJ6RwZj8FU/3FitXcbcC24aBxtLWSc6kE+iijs1+lf4lSxXw +ADySB+TI+1x9tDPxS5hwZ0XTpXwPEsLNL/MPGBlyMPAJrVeo/YI1XBO5D9bleDNk +9LHOHzsv9p6RJARgTes84dO6jtEAXGUPBQj13cDpFS/cVt0wj7VhDye6kyRnfCrs +66esKyJEO+R96yzH4hvAUjLcVN8ycuNHLWlbO3G3NxoIMS2QYdJYsuKVD27PnWHU +WMXFAq15o1qmL9sZl3wZpKS68kmuach91eNyB8MT7REK/NcQky6Q4p3Xf7vegEXS +slQZiAY= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/server4.key b/test/certificates_for_testing/server4.key new file mode 100644 index 00000000..c1d0527d --- /dev/null +++ b/test/certificates_for_testing/server4.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEA2W3zUVfE+64bAy2jVAtSux4BZ0gSIr7fS9/r8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A8tsjrW7V1if+V +P/LXtgFqlTSH41sBZAzksO623meGnzfJGWUjuAYF1OgzCF8VK3mk16PsGnXBCZHO +fltHrdaQje6MaCWE618BWV38jXkurK0Biv8wAcV0UFFxvCMVb7rNRUZw17js5Gi1 +APkLbjppysDlRt0rLd+vNw/BMbafgh7FRfxJ1FbUmZwpC6GNdottmYnLjYjPN/GT +vKSD5HmMAqZInYB+VoJwKaKP9W6NmVeE7M2mV0NgIxeZNOGrMKOSUKPWZVVdmIR0 +2BdmoQKCAQB2Y6LaKUO7szp+JySXPHCx8q8VdtDNvNztPRH/+bWqL4K+JyZ1z2yK +QQ/ato/+oDChR8yoMmge6a4Zc4zZEb7OYtLp639Jv3IpoSQyYIA5rd4tTuLWRUnj +rCJI2sVhRXSuBwgZlt6/JLVi/trolUFqGMWIkdC5NtNXzl0+AbEp2BFrDMDDk+GU +JqMDnjQ+UAAxB2Kcd8kDHTCBq2hAkcNuRocA3Vccv7KfLfssU/dKRgX0sWbsFl2Y +2k4Lg3Los9IHIO3LZhtrLlVLhZwhgK5WJVbv8C+I8qaoOJyyn3fG5W0RUuVbUmFf +ITFOpYbGLLHm6jaAd28JEngfIjETrLkxAoIBAFgLV2MEmlJDtJbsLmBvgJkzUrls +Xuu3M3dq5S9mpSBK4OLkFqwAQbrxVLeiSDlsUQfqe4u/wuUIX4iOh2DTogB5N+oT +HhFt0tQ9e1tBW0/ZU/LGcpXrsfqkWyKa2aKp5Bv7PSuXvy3GSolHmwu+qltAbB+z +kQtMmyhTvI135cl4wXg2qzg6mnt1bZje28HAHArkw1R5lIEk2nhGwlrnUde52EIu +nkpDI9Y58GZDmCbJl5mlAv7Uz9jbULAsBg6Db2wa0HtfeFEX1kkwmg1xfUKURAXd +MKKHnqU5FKvNYKy4XSRpV0Fi1Y4rUoMxCPPtiR+ya/sesLODe94tlBcGO1k= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server4.pem b/test/certificates_for_testing/server4.pem new file mode 100644 index 00000000..cf78cd85 --- /dev/null +++ b/test/certificates_for_testing/server4.pem @@ -0,0 +1,85 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUPppZoZRnGEOImm0XMRorC3oGesowDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMjIxWhcNMjIwNDEyMDgzMjIxWjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2W3zUVfE+64bAy2j +VAtSux4BZ0gSIr7fS9/r8fnFsLdjiwVgjJjL447bMWm/xA6FBNeX/iIFtP8kBiEN +r2dRj/k63WGEDtHVXI7Y57wI+VNYua+zxdhAfgiGKjKXvbgJnQ0plBh0xkMfZm5c +sGvB76CzKYXIVdHrUvZFvRFIsMC/Zio1APFg9fgdJ+ePcqUhXkGtQycedLqDXfDW +PUR+GDyB5qsRDJyOwp8bwh8fTE0CxyonaqeHyAbg6h6Po6MNghJnNdslGoH09EZU +EuTin4XTMx6jnjT40CRM1KzxFJ6e0SHu0ekY0uhZF3W3NvdSSQFQ8URefMShhphZ +5hLWM2v1eEzq7v9jbFo6qUmTv803S1wWGv5MVs/5WYjkxPm02CKBQRdyR0W00/qB +ZpZYXBwyDvVqiWL7uWu0LpNjBO/buOV8tn+2ti211MYYyiSiRPSdKPSbCgEQMzg0 +6/RRbcMGMAyRzFmtrBOfSROQFGhSAl54crQhsxUCZ7dx2gBxVohif65Brv/HkfWZ +iekHZqojp8NfEZSm2LvXyMx/0B7fTck87oWIFv+qsMKU4BhrHNBv7dr1OjbcD91p +n3cgqE/egabHAS5MiVUT85tVEh72+EvB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ing/server5.crt b/test/certificates_for_testing/server5.crt new file mode 100644 index 00000000..21a6b765 --- /dev/null +++ b/test/certificates_for_testing/server5.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUeBuxF4uaJA2Sv8UxrEpHcgweMq4wDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMzIzWhcNMjIwNDEyMDgzMzIzWjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvX0j9GKFcw3DzHzt ++wp70sjlJTVAP3Vus8QwEKGUQ6DXe1+BvUyyNPQZBQzExdbnZO8sjjW+PZketVCx +ZqFY5wRilF02Q4kRWEGjMrYBy3O1ufzhPKFJpUnZ9/v4QiocPoGHNvecQhFpnkb8 +CxWaDUT0ZzSOxQBbg3FYwRJ/Q7Akpa5N1by/qUNKEX/EOJok4DMSxrYxsW/saBbV +PwXI2+0TvJjB0k6SwReS3AeW6tC1Qg6AhqdJ+ATlm7LoAHuWxNzNRQJKDErDM0mU +F0qodSi648RgIef8HZPd0BEaeetY1wl0IfqUmqnBCEnjQXXeXY3znvNSuuXEA63z +qKHQv+FDV2pWoJMtuMecLUnGVXaGRNmd8PCPYoOlFkRLoin/KilcUTJ4ZSEJlInr +3Q2ET9OF9vGimj7H4J2omEbn/mHYGL5Wm1CuEroEkXCDB62Xhp4Ljs63QqfdxUxM +EA5qwz03uw9/O8C2uy74qil0rYGxHRKGWXHZ4YsXOUM5poUoCypRTqUcEB92BMZH +V3omEOiFCZ36vM2sCZJ14NmFRusk1YWXcwp3rdhex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GQ +iRZLQ6s= +-----END CERTIFICATE----- diff --git a/test/certificates_for_testing/server5.key b/test/certificates_for_testing/server5.key new file mode 100644 index 00000000..c345c555 --- /dev/null +++ b/test/certificates_for_testing/server5.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAvX0j9GKFcw3DzHzt+wp70sjlJTVAP3Vus8QwEKGUQ6DXe1+B +vUyyNPQZBQzExdbnZO8sjjW+PZketVCxZqFY5wRilF02Q4kRWEGjMrYBy3O1ufzh +PKFJpUnZ9/v4QiocPoGHNvecQhFpnkb8CxWaDUT0ZzSOxQBbg3FYwRJ/Q7Akpa5N +1by/qUNKEX/EOJok4DMSxrYxsW/saBbVPwXI2+0TvJjB0k6SwReS3AeW6tC1Qg6A +hqdJ+ATlm7LoAHuWxNzNRQJKDErDM0mUF0qodSi648RgIef8HZPd0BEaeetY1wl0 +IfqUmqnBCEnjQXXeXY3znvNSuuXEA63zqKHQv+FDV2pWoJMtuMecLUnGVXaGRNmd +8PCPYoOlFkRLoin/KilcUTJ4ZSEJlInr3Q2ET9OF9vGimj7H4J2omEbn/mHYGL5W +m1CuEroEkXCDB62Xhp4Ljs63QqfdxUxMEA5qwz03uw9/O8C2uy74qil0rYGxHRKG +WXHZ4YsXOUM5poUoCypRTqUcEB92BMZHV3omEOiFCZ36vM2sCZJ14NmFRusk1YWX +cwp3rdhexRXjpoRXUY3yn/RIcGwU44RrkBp3pu0OYxu+Ax+l++h2lwESFw+305uB +yvjq2Ugc/YrijFGh8GrK+9tOzkqBjA8dAYsZnQAi8E9Hra6hKdE/emGNF18CAwEA +AQKCAgEAux7u+JCqE/oN1suv/u5VZMv6bQnvDjubPG6KwIGvdjFJWY3xAszQVraO +VoxLbMtR6jy+FRlBanbg+lBbP2wp7MhJyRVbVsnulOcMkDFoCE+Vr7rnegYUQeNy +Gg97E2ueRKOIsWFHr36efCzBDPkiDeSALcKbEjPOKzktWkw33NH+/pXoSx9/bVkD +tdAkJ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IS1WtZy0WO/NR +NAeiwDmHYBgj+esax+gf2p9Iy96ZvaaexOkIfZ3hdFB0A98bDhizW2xkoa8Iz0Yl +gSeWkaGiA2ygdPNzbdfhV8DQ7Pj+n5/CwyGSGMW5P9tpzvy2rW2KYImAVtA= +-----END RSA PRIVATE KEY----- diff --git a/test/certificates_for_testing/server5.pem b/test/certificates_for_testing/server5.pem new file mode 100644 index 00000000..b348c3c1 --- /dev/null +++ b/test/certificates_for_testing/server5.pem @@ -0,0 +1,85 @@ +-----BEGIN CERTIFICATE----- +MIIF0TCCA7mgAwIBAgIUeBuxF4uaJA2Sv8UxrEpHcgweMq4wDQYJKoZIhvcNAQEL +BQAwUjELMAkGA1UEBhMCVVMxCjAIBgNVBAgMASAxCjAIBgNVBAcMASAxCjAIBgNV +BAoMASAxEzARBgNVBAsMCm1vbmdvX2RhcnQxCjAIBgNVBAMMASAwHhcNMjEwNDEy +MDgzMzIzWhcNMjIwNDEyMDgzMzIzWjBLMQswCQYDVQQGEwJVUzEKMAgGA1UECAwB +IDEKMAgGA1UEBwwBIDETMBEGA1UECgwKbW9uZ28tZGFydDEPMA0GA1UECwwGc2Vy +dmVyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvX0j9GKFcw3DzHzt ++wp70sjlJTVAP3Vus8QwEKGUQ6DXe1+BvUyyNPQZBQzExdbnZO8sjjW+PZketVCx +ZqFY5wRilF02Q4kRWEGjMrYBy3O1ufzhPKFJpUnZ9/v4QiocPoGHNvecQhFpnkb8 +CxWaDUT0ZzSOxQBbg3FYwRJ/Q7Akpa5N1by/qUNKEX/EOJok4DMSxrYxsW/saBbV +PwXI2+0TvJjB0k6SwReS3AeW6tC1Qg6AhqdJ+ATlm7LoAHuWxNzNRQJKDErDM0mU +F0qodSi648RgIef8HZPd0BEaeetY1wl0IfqUmqnBCEnjQXXeXY3znvNSuuXEA63z +qKHQv+FDV2pWoJMtuMecLUnGVXaGRNmd8PCPYoOlFkRLoin/KilcUTJ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q20sWRWfxQSFqiuJ2ROwayl9sZH +NGUhd1yfflr/qwWLykg7DeU6krtrpsL5K74FEwtSF5byRJtAVwWIS1WtZy0WO/NR +NAeiwDmHYBgj+esax+gf2p9Iy96ZvaaexOkIfZ3hdFB0A98bDhizW2xkoa8Iz0Yl +gSeWkaGiA2ygdPNzbdfhV8DQ7Pj+n5/CwyGSGMW5P9tpzvy2rW2KYImAVtA= +-----END RSA PRIVATE KEY----- diff --git a/test/client_certificate_test_manual.dart b/test/client_certificate_test_manual.dart new file mode 100644 index 00000000..a3344225 --- /dev/null +++ b/test/client_certificate_test_manual.dart @@ -0,0 +1,122 @@ +import 'dart:io'; + +import 'package:test/test.dart'; +import 'package:mongo_dart/mongo_dart.dart'; + +// Insert in your hosts file: +// 127.0.0.1 server1 +// +// Run server1 with these parameters: +// mongod --port 27017 --dbpath --oplogSize 128 +// --tlsMode requireTLS --tlsCertificateKeyFile +// /test/certificates_for_testing/server1.pem +// --tlsCAFile +// /test/certificates_for_testing/mongo-test-ca-full-chain.crt +// +const dbName = 'mongo-dart-server-client-cert'; +const dbServerName = 'server1'; + +const defaultUri = 'mongodb://$dbServerName:27017/$dbName'; + +void main() { + group('Client certificate', () { + var caCertFile = File('${Directory.current.path}' + '/test/certificates_for_testing/mongo-test-ca-full-chain.crt'); + var pemFile = File('${Directory.current.path}' + '/test/certificates_for_testing/client.mongo.pem'); + var wrongPemFile = File('test/certificates_for_testing/client.mongo.crt'); + + test('Should not be able to connect missing key file and CA file', + () async { + var db = Db(defaultUri); + + try { + await db.open(secure: true); + expect(true, isFalse); + } on ConnectionException { + expect(true, isTrue); + } catch (e) { + expect(true, isFalse); + } finally { + await db.close(); + } + }); + + test('Should not be able to connect missing key file', () async { + var db = Db(defaultUri); + + try { + await db.open(secure: true, tlsCAFile: caCertFile.path); + expect(true, isFalse); + } on ConnectionException { + expect(true, isTrue); + } catch (e) { + expect(true, isFalse); + } finally { + await db.close(); + } + }); + + // Check to avoid problems with the + // "certificate already in hash table error" + test( + 'Should not be able to connect missing key file, CA File given 2 times', + () async { + var db = Db(defaultUri); + + try { + await db.open(secure: true, tlsCAFile: caCertFile.path); + expect(true, isFalse); + } on ConnectionException { + expect(true, isTrue); + } catch (e) { + expect(true, isFalse); + } finally { + await db.close(); + } + }); + + test('Wrong pem file', () async { + var db = Db(defaultUri); + try { + await db.open( + secure: true, + tlsCAFile: caCertFile.path, + tlsCertificateKeyFile: wrongPemFile.path); + await db.close(); + expect(true, isFalse); + } on ConnectionException { + expect(true, isTrue); + } catch (e) { + expect(true, isFalse); + } finally { + await db.close(); + } + }); + test('Connect no problems with cert', () async { + var db = Db(defaultUri); + + await db.open( + secure: true, + tlsCAFile: caCertFile.path, + tlsCertificateKeyFile: pemFile.path); + await db.close(); + }); + + test('Reopen connection', () async { + var db = Db(defaultUri); + + await db.open( + secure: true, + tlsCAFile: caCertFile.path, + tlsCertificateKeyFile: pemFile.path); + await db.close(); + + await db.open( + secure: true, + tlsCAFile: caCertFile.path, + tlsCertificateKeyFile: pemFile.path); + await db.close(); + }); + }); +} diff --git a/test/server_certificate_test_manual.dart b/test/server_certificate_test_manual.dart new file mode 100644 index 00000000..90b70538 --- /dev/null +++ b/test/server_certificate_test_manual.dart @@ -0,0 +1,81 @@ +import 'dart:io'; + +import 'package:test/test.dart'; +import 'package:mongo_dart/mongo_dart.dart'; + +// Insert in your hosts file: +// 127.0.0.1 server1 +// 127.0.0.1 server2 +// +// Run server1 with these parameters: +// mongod --port 27017 --dbpath --oplogSize 128 +// --tlsMode requireTLS --tlsCertificateKeyFile +// /test/certificates_for_testing/server1.pem +// +// Run server2 with these parameters: +// mongod --port 27018 --dbpath --oplogSize 128 +// --tlsMode requireTLS --tlsCertificateKeyFile +// /test/certificates_for_testing/server2.pem +const dbName = 'mongo-dart-server-cert'; +const dbServerName = 'server1'; +const defaultUri = 'mongodb://$dbServerName:27017/$dbName'; + +const dbServerName2 = 'server2'; +const defaultUri2 = 'mongodb://$dbServerName2:27018/$dbName'; + +void main() { + group('Server certificate', () { + var caCertFile = + File('test/certificates_for_testing/mongo-test-ca-full-chain.crt'); + + test('No certificate, no connection', () async { + var db = Db(defaultUri); + + try { + await db.open(secure: true); + expect(true, isFalse); + } on ConnectionException { + expect(true, isTrue); + } catch (e) { + expect(true, isFalse); + } finally { + await db.close(); + } + }); + + test('Must be run all together', () async { + var db = Db(defaultUri); + + await db.open(secure: true, tlsCAFile: caCertFile.path); + await db.close(); + + // Check to avoid problems with the + // "certificate already in hash table error" + //test('Connect no problems with cert', () async { + db = Db(defaultUri); + + await db.open(secure: true, tlsCAFile: caCertFile.path); + await db.close(); + //}); + + // same isolate, once connected, the certificate stays in cache + //test('Reopen connection', () async { + db = Db(defaultUri); + + await db.open(secure: true); + await db.close(); + + await db.open(secure: true, tlsCAFile: caCertFile.path); + await db.close(); + //}); + + // The certificate stays in cache even for a different server + // (with a certificate from the same authority) + //test('Connects with no problems on a different server', () async { + db = Db(defaultUri2); + + await db.open(secure: true); + await db.close(); + }); + }); +}