bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)

Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
This commit is contained in:
Pablo Galindo 2018-10-29 16:47:44 -04:00 committed by GitHub
parent ed271b2350
commit f6a47f3e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@
import logging
import socket
import sys
import unittest
from unittest import mock
try:
@ -429,6 +430,12 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
server_context = test_utils.simple_server_sslcontext()
client_context = test_utils.simple_client_sslcontext()
if sys.platform.startswith('freebsd'):
# bpo-35031: Some FreeBSD buildbots fail to run this test
# as the eof was not being received by the server if the payload
# size is not big enough. This behaviour only appears if the
# client is using TLS1.3.
client_context.options |= ssl.OP_NO_TLSv1_3
def client(sock, addr):
sock.settimeout(self.TIMEOUT)