void-packages/srcpkgs/buku/patches/use-system-cacerts.patch

49 lines
1.6 KiB
Diff
Raw Normal View History

2018-11-17 11:12:28 +00:00
diff --git buku buku
2019-04-30 07:29:53 +00:00
index 500ccbe..f8e29d3 100755
2018-11-17 11:12:28 +00:00
--- buku
+++ buku
2019-04-30 07:29:53 +00:00
@@ -42,7 +42,6 @@ try:
2018-11-17 11:12:28 +00:00
except ImportError:
pass
from bs4 import BeautifulSoup
-import certifi
import urllib3
from urllib3.exceptions import LocationParseError
from urllib3.util import parse_url, make_headers
2019-04-30 07:29:53 +00:00
@@ -93,6 +92,8 @@ LOGGER = logging.getLogger()
2018-11-17 11:12:28 +00:00
LOGDBG = LOGGER.debug
LOGERR = LOGGER.error
+def where():
+ return '/etc/ssl/certs/ca-certificates.crt'
class BukuCrypt:
"""Class to handle encryption and decryption of
2019-04-30 07:29:53 +00:00
@@ -2516,7 +2517,7 @@ class BukuDb:
if MYPROXY is None:
gen_headers()
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
if MYPROXY:
manager = urllib3.ProxyManager(
MYPROXY,
@@ -3426,7 +3427,7 @@ def get_PoolManager():
ProxyManager or PoolManager
ProxyManager if https_proxy is defined, PoolManager otherwise.
"""
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
2018-11-17 11:12:28 +00:00
if MYPROXY:
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
2019-04-30 07:29:53 +00:00
cert_reqs='CERT_REQUIRED', ca_certs=ca_certs)
@@ -4258,7 +4259,7 @@ def check_upstream_release():
if MYPROXY is None:
gen_headers()
2018-11-17 11:12:28 +00:00
2019-04-30 07:29:53 +00:00
- ca_certs = os.getenv('BUKU_CA_CERTS', default=certifi.where())
+ ca_certs = os.getenv('BUKU_CA_CERTS', default=where())
if MYPROXY:
manager = urllib3.ProxyManager(
MYPROXY,