# raise exception if verify fails (verify the chain)
ifinteractive:
self.show_message("Alias error: "+e.message)
return
printtarget,signing_address,auth_name
ifauth_nameisNone:
a=self.wallet.aliases.get(alias)
ifnota:
msg="Warning: the alias '%s' is self-signed.\nThe signing address is %s.\n\nDo you want to add this alias to your list of contacts?"%(alias,signing_address)
msg="Warning: the key of alias '%s' has changed since your last visit! It is possible that someone is trying to do something nasty!!!\nDo you accept to change your trusted key?"%alias
msg="The alias: '%s' links to %s\n\nWarning: this alias was signed by an unknown key.\nSigning authority: %s\nSigning address: %s\n\nDo you want to add this key to your list of trusted keys?"%(alias,target,auth_name,signing_address)
@ -497,14 +509,15 @@ class ElectrumWindow(QMainWindow):
grid.addWidget(pw,1,1)
vbox.addLayout(grid)
vbox.addLayout(self.ok_cancel_buttons(d))
vbox.addLayout(ok_cancel_buttons(d))
d.setLayout(vbox)
ifnotd.exec_():return
returnstr(pw.text())
defchange_password_dialog(self):
d=QDialog(self)
@staticmethod
defchange_password_dialog(wallet,parent=None):
d=QDialog(parent)
d.setModal(1)
pw=QLineEdit()
@ -515,13 +528,13 @@ class ElectrumWindow(QMainWindow):
conf_pw.setEchoMode(2)
vbox=QVBoxLayout()
msg='Your wallet is encrypted. Use this dialog to change your password.\nTo disable wallet encryption, enter an empty new password.'ifself.wallet.use_encryptionelse'Your wallet keys are not encrypted'
msg='Your wallet is encrypted. Use this dialog to change your password.\nTo disable wallet encryption, enter an empty new password.'ifwallet.use_encryptionelse'Your wallet keys are not encrypted'
vbox.addWidget(QLabel(msg))
grid=QGridLayout()
grid.setSpacing(8)
ifself.wallet.use_encryption:
ifwallet.use_encryption:
grid.addWidget(QLabel('Password'),1,0)
grid.addWidget(pw,1,1)
@ -532,26 +545,76 @@ class ElectrumWindow(QMainWindow):
# raise exception if verify fails (verify the chain)
ifinteractive:
show_message("Alias error: "+e.message)
return
printtarget,signing_address,auth_name
ifauth_nameisNone:
a=self.aliases.get(alias)
ifnota:
msg="Warning: the alias '%s' is self-signed.\nThe signing address is %s.\n\nDo you want to add this alias to your list of contacts?"%(alias,signing_address)
ifinteractiveandquestion(msg):
self.aliases[alias]=(signing_address,target)
else:
target=None
else:
ifsigning_address!=a[0]:
msg="Warning: the key of alias '%s' has changed since your last visit! It is possible that someone is trying to do something nasty!!!\nDo you accept to change your trusted key?"%alias
ifinteractiveandquestion(msg):
self.aliases[alias]=(signing_address,target)
else:
target=None
else:
ifsigning_addressnotinself.authorities.keys():
msg="The alias: '%s' links to %s\n\nWarning: this alias was signed by an unknown key.\nSigning authority: %s\nSigning address: %s\n\nDo you want to add this key to your list of trusted keys?"%(alias,target,auth_name,signing_address)