diff --git a/osm_nbi/notifications.py b/osm_nbi/notifications.py index 22413d0b4f97a5481e2dd415242bddf7770a4e78..5994159c80844dbc0a0bbe7ad80ddf574df37ea0 100644 --- a/osm_nbi/notifications.py +++ b/osm_nbi/notifications.py @@ -18,6 +18,8 @@ __date__ = "$28-Apr-2020 23:59:59$" import asyncio import aiohttp +import ssl +import certifi from http import HTTPStatus import json import logging @@ -154,7 +156,9 @@ class NotificationBase: if notifications: tasks = [] - async with aiohttp.ClientSession() as session: + ssl_context = ssl.create_default_context(cafile=certifi.where()) + conn = aiohttp.TCPConnector(ssl=ssl_context) + async with aiohttp.ClientSession(connector=conn) as session: for notification in notifications: tasks.append( asyncio.ensure_future(