void-packages/srcpkgs/electrum-ltc/patches/no-certifi.patch

107 lines
3.1 KiB
Diff

diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt
index 4ca2422..ac60e57 100644
--- contrib/requirements/requirements.txt
+++ contrib/requirements/requirements.txt
@@ -8,4 +8,3 @@ qdarkstyle<3.0
aiorpcx>=0.17,<0.18
aiohttp>=3.3.0
aiohttp_socks
-certifi
diff --git electrum_ltc/interface.py electrum_ltc/interface.py
index 8a019af..7a5a7e7 100644
--- electrum_ltc/interface.py
+++ electrum_ltc/interface.py
@@ -38,7 +38,6 @@ import aiorpcx
from aiorpcx import RPCSession, Notification, NetAddress
from aiorpcx.curio import timeout_after, TaskTimeout
from aiorpcx.jsonrpc import JSONRPC
-import certifi
from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup
from . import util
@@ -55,7 +54,7 @@ if TYPE_CHECKING:
from .network import Network
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
BUCKET_NAME_OF_ONION_SERVERS = 'onion'
diff --git electrum_ltc/paymentrequest.py electrum_ltc/paymentrequest.py
index 205eda7..1ab1df2 100644
--- electrum_ltc/paymentrequest.py
+++ electrum_ltc/paymentrequest.py
@@ -28,7 +28,6 @@ import time
import traceback
import json
-import certifi
import urllib.parse
import aiohttp
@@ -53,7 +52,7 @@ _logger = get_logger(__name__)
REQUEST_HEADERS = {'Accept': 'application/litecoin-paymentrequest', 'User-Agent': 'Electrum'}
ACK_HEADERS = {'Content-Type':'application/litecoin-payment','Accept':'application/litecoin-paymentack','User-Agent':'Electrum'}
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
ca_list = None
ca_keyID = None
diff --git electrum_ltc/util.py electrum_ltc/util.py
index 0df8786..607e043 100644
--- electrum_ltc/util.py
+++ electrum_ltc/util.py
@@ -44,7 +44,6 @@ import ssl
import aiohttp
from aiohttp_socks import SocksConnector, SocksVer
from aiorpcx import TaskGroup
-import certifi
from .i18n import _
from .logging import get_logger, Logger
@@ -62,7 +61,7 @@ def inv_dict(d):
return {v: k for k, v in d.items()}
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
base_units = {'LTC':8, 'mLTC':5, 'uLTC':2, 'sat':0}
diff --git electrum_ltc/x509.py electrum_ltc/x509.py
index c38edc7..e745e48 100644
--- electrum_ltc/x509.py
+++ electrum_ltc/x509.py
@@ -343,7 +343,6 @@ def load_certificates(ca_path):
if __name__ == "__main__":
- import certifi
- ca_path = certifi.where()
+ ca_path = '/etc/ssl/certs/ca-certificates.crt'
ca_list, ca_keyID = load_certificates(ca_path)
diff --git run_electrum run_electrum
index b10462c..805dc8f 100755
--- run_electrum
+++ run_electrum
@@ -55,7 +55,6 @@ def check_imports():
import dns
import pyaes
import ecdsa
- import certifi
import qrcode
import google.protobuf
import jsonrpclib
@@ -69,7 +68,7 @@ def check_imports():
from google.protobuf import descriptor_pb2
from jsonrpclib import SimpleJSONRPCServer
# make sure that certificates are here
- assert os.path.exists(certifi.where())
+ assert os.path.exists('/etc/ssl/certs/ca-certificates.crt')
if not is_android: