diff options
Diffstat (limited to 'poezio/connection.py')
-rw-r--r-- | poezio/connection.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/poezio/connection.py b/poezio/connection.py index c24dd913..503d9169 100644 --- a/poezio/connection.py +++ b/poezio/connection.py @@ -3,7 +3,7 @@ # This file is part of Poezio. # # Poezio is free software: you can redistribute it and/or modify -# it under the terms of the zlib license. See the COPYING file. +# it under the terms of the GPL-3.0+ license. See the COPYING file. """ Defines the Connection class """ @@ -16,6 +16,7 @@ import subprocess import sys import base64 import random +from pathlib import Path import slixmpp from slixmpp import JID, InvalidJID @@ -117,7 +118,10 @@ class Connection(slixmpp.ClientXMPP): self.ciphers = config.getstr( 'ciphers', 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK' ':!SRP:!3DES:!aNULL') - self.ca_certs = config.getstr('ca_cert_path') or None + self.ca_certs = None + ca_certs = config.getlist('ca_cert_path') + if ca_certs and ca_certs != ['']: + self.ca_certs = list(map(Path, config.getlist('ca_cert_path'))) interval = config.getint('whitespace_interval') if int(interval) > 0: self.whitespace_keepalive_interval = int(interval) @@ -200,6 +204,11 @@ class Connection(slixmpp.ClientXMPP): log.error('Failed to load HTTP File Upload plugin, it can only be ' 'used with aiohttp installed') self.register_plugin('xep_0380') + try: + self.register_plugin('xep_0454') + except slixmpp.plugins.base.PluginNotFound: + log.error('Failed to load Media Sharing plugin, ' + 'it requires slixmpp 1.8.2.') self.init_plugins() def set_keepalive_values(self, option=None, value=None): |