Assume CA bundle is UTF-8 encoded to fix #292

This commit is contained in:
daniel-123 2020-05-15 18:40:40 +02:00
parent 05f9a179dd
commit 0e791559c5

View File

@ -759,7 +759,7 @@ class SyncplayClient(object):
self._endpoint = HostnameEndpoint(reactor, host, port) self._endpoint = HostnameEndpoint(reactor, host, port)
try: try:
caCertFP = open(os.environ['SSL_CERT_FILE']) caCertFP = open(os.environ['SSL_CERT_FILE'])
caCertTwisted = Certificate.loadPEM(caCertFP.read()) caCertTwisted = Certificate.loadPEM(caCertFP.read().encode('utf-8')
caCertFP.close() caCertFP.close()
self.protocolFactory.options = optionsForClientTLS(hostname=host) self.protocolFactory.options = optionsForClientTLS(hostname=host)
self._clientSupportsTLS = True self._clientSupportsTLS = True