Skip to content

Commit 98f7eb7

Browse files
committed
Use certifi instead of bundling certificates ourselves
1 parent ade04b4 commit 98f7eb7

3 files changed

Lines changed: 11 additions & 109 deletions

File tree

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def run(self):
120120
'hachiko',
121121
'python-snappy',
122122
'erlastic',
123+
'certifi',
123124
'tzlocal',
124125
'iso8601'
125126
],

syncrypt/backends/binary.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1+
import asyncio
12
import logging
3+
import math
4+
import os.path
25
import re
36
import ssl
4-
import sys
57
import struct
6-
import os.path
8+
import sys
79
import time
8-
import math
910
from getpass import getpass
1011

11-
import asyncio
1212
from erlastic import Atom
13+
14+
import certifi
1315
import syncrypt
1416
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)
1720
from syncrypt.utils.format import format_size
1821
from syncrypt.vendor import bert
19-
from syncrypt.exceptions import VaultNotInitialized
20-
from syncrypt.ca import ROOT_CA_DATA
2122

2223
from .base import StorageBackend, StorageBackendInvalidAuth
2324

@@ -130,7 +131,7 @@ def write_term(self, *term):
130131
@asyncio.coroutine
131132
def connect(self):
132133
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())
134135
if not self.storage.ssl_verify or self.storage.host in ('127.0.0.1', 'localhost'):
135136
logger.warn('Continuing without verifying SSL cert')
136137
sc.check_hostname = False

syncrypt/ca/__init__.py

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)