Commit d713ce90 authored by Philipp Hörist's avatar Philipp Hörist

Load files from FreeBSD specific location

Fixes #53
parent 7bccbcba
Pipeline #1883 passed with stages
in 14 seconds
......@@ -448,12 +448,15 @@ class NonBlockingTLS(PlugIn):
store = tcpsock._sslContext.get_cert_store()
self._load_cert_file(self.cacerts, store)
self._load_cert_file(self.mycerts, store)
if os.path.isdir('/etc/ssl/certs'):
for f in os.listdir('/etc/ssl/certs'):
# We don't logg because there is a lot a duplicated certs in this
# folder
self._load_cert_file(os.path.join('/etc/ssl/certs', f), store,
logg=False)
paths = ['/etc/ssl/certs',
'/etc/ssl'] # FreeBSD uses this
for path in paths:
if not os.path.isdir(path):
continue
for f in os.listdir(path):
# We don't logg because there is a lot a duplicated certs
# in this folder
self._load_cert_file(os.path.join(path, f), store, logg=False)
tcpsock._sslObj = OpenSSL.SSL.Connection(tcpsock._sslContext,
tcpsock._sock)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment