rename ssl config variables
This commit is contained in:
parent
1b6abf6e02
commit
c35cdf1fd8
|
@ -737,9 +737,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
message = self.wallet.labels.get(addr, '')
|
message = self.wallet.labels.get(addr, '')
|
||||||
script = Transaction.pay_script('address', addr).decode('hex')
|
script = Transaction.pay_script('address', addr).decode('hex')
|
||||||
outputs = [(script, amount)]
|
outputs = [(script, amount)]
|
||||||
cert_path = self.config.get('cert_path')
|
key_path = self.config.get('ssl_key_path')
|
||||||
chain_path = self.config.get('chain_path')
|
cert_path = self.config.get('ssl_cert_path')
|
||||||
return make_payment_request(outputs, message, time, time + expiration, cert_path, chain_path)
|
return make_payment_request(outputs, message, time, time + expiration, key_path, cert_path)
|
||||||
|
|
||||||
def export_payment_request(self, addr):
|
def export_payment_request(self, addr):
|
||||||
pr = self.make_payment_request(addr)
|
pr = self.make_payment_request(addr)
|
||||||
|
|
|
@ -258,7 +258,7 @@ class PaymentRequest:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def make_payment_request(outputs, memo, time, expires, cert_path, chain_path):
|
def make_payment_request(outputs, memo, time, expires, key_path, cert_path):
|
||||||
pd = pb2.PaymentDetails()
|
pd = pb2.PaymentDetails()
|
||||||
for script, amount in outputs:
|
for script, amount in outputs:
|
||||||
pd.outputs.add(amount=amount, script=script)
|
pd.outputs.add(amount=amount, script=script)
|
||||||
|
@ -271,11 +271,11 @@ def make_payment_request(outputs, memo, time, expires, cert_path, chain_path):
|
||||||
pr = pb2.PaymentRequest()
|
pr = pb2.PaymentRequest()
|
||||||
pr.serialized_payment_details = pd.SerializeToString()
|
pr.serialized_payment_details = pd.SerializeToString()
|
||||||
pr.signature = ''
|
pr.signature = ''
|
||||||
if cert_path and chain_path:
|
if key_path and cert_path:
|
||||||
import tlslite
|
import tlslite
|
||||||
with open(cert_path, 'r') as f:
|
with open(key_path, 'r') as f:
|
||||||
rsakey = tlslite.utils.python_rsakey.Python_RSAKey.parsePEM(f.read())
|
rsakey = tlslite.utils.python_rsakey.Python_RSAKey.parsePEM(f.read())
|
||||||
with open(chain_path, 'r') as f:
|
with open(cert_path, 'r') as f:
|
||||||
chain = tlslite.X509CertChain()
|
chain = tlslite.X509CertChain()
|
||||||
chain.parsePemList(f.read())
|
chain.parsePemList(f.read())
|
||||||
certificates = pb2.X509Certificates()
|
certificates = pb2.X509Certificates()
|
||||||
|
|
Loading…
Reference in New Issue