Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .evergreen/scripts/setup-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ if [ "$(uname -s)" = "Darwin" ]; then
fi
fi

if [ -w /etc/hosts ]; then
SUDO=""
else
SUDO="sudo"
fi

# Add 'server' and 'hostname_not_in_cert' as a hostnames
echo "127.0.0.1 server" | $SUDO tee -a /etc/hosts
echo "127.0.0.1 hostname_not_in_cert" | $SUDO tee -a /etc/hosts

echo "Setting up system... done."
10 changes: 10 additions & 0 deletions test/asynchronous/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,13 @@ async def test_cert_ssl_uri_support(self):
client = self.simple_client(uri_fmt % (CLIENT_PEM, "true", CA_PEM))
await self.assertClientWorks(client)

@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@async_client_context.require_tlsCertificateKeyFile
@async_client_context.require_server_resolvable
@async_client_context.require_no_api_version
@ignore_deprecations
async def test_cert_ssl_validation_hostname_matching(self):
# Expects the server to be running with server.pem and ca.pem
Expand Down Expand Up @@ -430,8 +435,13 @@ async def test_tlsCRLFile_support(self):
self.simple_client(uri_fmt % (CRL_PEM, CA_PEM), **self.credentials) # type: ignore[arg-type]
)

@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@async_client_context.require_tlsCertificateKeyFile
@async_client_context.require_server_resolvable
@async_client_context.require_no_api_version
@ignore_deprecations
async def test_validation_with_system_ca_certs(self):
# Expects the server to be running with server.pem and ca.pem.
Expand Down
10 changes: 10 additions & 0 deletions test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,13 @@ def test_cert_ssl_uri_support(self):
client = self.simple_client(uri_fmt % (CLIENT_PEM, "true", CA_PEM))
self.assertClientWorks(client)

@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@client_context.require_tlsCertificateKeyFile
@client_context.require_server_resolvable
@client_context.require_no_api_version
@ignore_deprecations
def test_cert_ssl_validation_hostname_matching(self):
# Expects the server to be running with server.pem and ca.pem
Expand Down Expand Up @@ -430,8 +435,13 @@ def test_tlsCRLFile_support(self):
self.simple_client(uri_fmt % (CRL_PEM, CA_PEM), **self.credentials) # type: ignore[arg-type]
)

@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@client_context.require_tlsCertificateKeyFile
@client_context.require_server_resolvable
@client_context.require_no_api_version
@ignore_deprecations
def test_validation_with_system_ca_certs(self):
# Expects the server to be running with server.pem and ca.pem.
Expand Down
Loading