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

49 lines
1.6 KiB
Diff

diff --git buku buku
index 500ccbe..f8e29d3 100755
--- buku
+++ buku
@@ -42,7 +42,6 @@ try:
except ImportError:
pass
from bs4 import BeautifulSoup
-import certifi
import urllib3
from urllib3.exceptions import LocationParseError
from urllib3.util import parse_url, make_headers
@@ -93,6 +92,8 @@ LOGGER = logging.getLogger()
LOGDBG = LOGGER.debug
LOGERR = LOGGER.error
+def where():
+ return '/etc/ssl/certs/ca-certificates.crt'
class BukuCrypt:
"""Class to handle encryption and decryption of
@@ -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())
if MYPROXY:
return urllib3.ProxyManager(MYPROXY, num_pools=1, headers=MYHEADERS, timeout=15,
cert_reqs='CERT_REQUIRED', ca_certs=ca_certs)
@@ -4258,7 +4259,7 @@ def check_upstream_release():
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,