# Buggy code
def __init__(self, config, opsdroid=None):
    """Create the connector."""
    super().__init__(config, opsdroid=opsdroid)
    _LOGGER.debug(_("Starting Slack connector"))
    self.name = "slack"
    self.default_target = config.get("default-room", "#general")
    self.icon_emoji = config.get("icon-emoji", ":robot_face:")
    self.token = config["api-token"]
    self.timeout = config.get("connect-timeout", 10)
    self.slack = slack.WebClient(token=self.token, run_async=True)
    self.slack_rtm = slack.RTMClient(token=self.token, run_async=True)
    self.websocket = None
    self.bot_name = config.get("bot-name", "opsdroid")
    self.auth_info = None
    self.user_info = None
    self.bot_id = None
    self.known_users = {}
    self.keepalive = None
    self.reconnecting = False
    self.listening = True
    self._message_id = 0

    # Register callbacks
    slack.RTMClient.on(event="message", callback=self.process_message)


# Traceback (ssl.SSLError)
INFO opsdroid.connector.slack: Connecting to Slack
Traceback (most recent call last):
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
File "/usr/lib/python3.6/asyncio/base_events.py", line 820, in create_connection
sock, protocol_factory, ssl, server_hostname)
File "/usr/lib/python3.6/asyncio/base_events.py", line 846, in _create_connection_transport
yield from waiter
File "/usr/lib/python3.6/asyncio/sslproto.py", line 505, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/usr/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/opsdroid/connector/slack/__init__.py", line 55, in connect
self.auth_info = (await self.slack.api_call("auth.test")).data
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/slack/web/base_client.py", line 229, in _send
http_verb=http_verb, api_url=api_url, req_args=req_args
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/slack/web/base_client.py", line 259, in _request
async with session.request(http_verb, api_url, **req_args) as res:
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/home/daniccan/c8/OpsDroid/c8-alertbot/env/lib/python3.6/site-packages/aiohttp/connector.py", line 941, in _wrap_create_connection
raise ClientConnectorSSLError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host www.slack.com:443 ssl:default [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)]

# Fixed code
def __init__(self, config, opsdroid=None):
    """Create the connector."""
    super().__init__(config, opsdroid=opsdroid)
    _LOGGER.debug(_("Starting Slack connector"))
    self.name = "slack"
    self.default_target = config.get("default-room", "#general")
    self.icon_emoji = config.get("icon-emoji", ":robot_face:")
    self.token = config["api-token"]
    self.timeout = config.get("connect-timeout", 10)
    self.ssl_context = ssl.create_default_context(cafile=certifi.where())
    self.slack = slack.WebClient(token=self.token, run_async=True, ssl=self.ssl_context)
    self.slack_rtm = slack.RTMClient(
        token=self.token, run_async=True, ssl=self.ssl_context
    )
    self.websocket = None
    self.bot_name = config.get("bot-name", "opsdroid")
    self.auth_info = None
    self.user_info = None
    self.bot_id = None
    self.known_users = {}
    self.keepalive = None
    self.reconnecting = False
    self.listening = True
    self._message_id = 0

    # Register callbacks
    slack.RTMClient.on(event="message", callback=self.process_message)