|
| 1 | +import asyncio |
1 | 2 | import logging |
| 3 | +import math |
| 4 | +import os.path |
2 | 5 | import re |
3 | 6 | import ssl |
4 | | -import sys |
5 | 7 | import struct |
6 | | -import os.path |
| 8 | +import sys |
7 | 9 | import time |
8 | | -import math |
9 | 10 | from getpass import getpass |
10 | 11 |
|
11 | | -import asyncio |
12 | 12 | from erlastic import Atom |
| 13 | + |
| 14 | +import certifi |
13 | 15 | import syncrypt |
14 | 16 | from syncrypt import __project__, __version__ |
15 | | -from syncrypt.pipes import (Limit, Once, StreamReader, StreamWriter, URLReader, |
16 | | - URLWriter, ChunkedURLWriter, BufferedFree) |
| 17 | +from syncrypt.exceptions import VaultNotInitialized |
| 18 | +from syncrypt.pipes import (BufferedFree, ChunkedURLWriter, Limit, Once, |
| 19 | + StreamReader, StreamWriter, URLReader, URLWriter) |
17 | 20 | from syncrypt.utils.format import format_size |
18 | 21 | from syncrypt.vendor import bert |
19 | | -from syncrypt.exceptions import VaultNotInitialized |
20 | | -from syncrypt.ca import ROOT_CA_DATA |
21 | 22 |
|
22 | 23 | from .base import StorageBackend, StorageBackendInvalidAuth |
23 | 24 |
|
@@ -130,7 +131,7 @@ def write_term(self, *term): |
130 | 131 | @asyncio.coroutine |
131 | 132 | def connect(self): |
132 | 133 | if self.storage.ssl: |
133 | | - sc = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cadata=ROOT_CA_DATA) |
| 134 | + sc = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=certifi.where()) |
134 | 135 | if not self.storage.ssl_verify or self.storage.host in ('127.0.0.1', 'localhost'): |
135 | 136 | logger.warn('Continuing without verifying SSL cert') |
136 | 137 | sc.check_hostname = False |
|
0 commit comments