[Nym3-commit] r220 - trunk/nym3/Client
laurent at conuropsis.org
laurent at conuropsis.org
Mon May 2 14:17:18 CEST 2005
Author: laurent
Date: 2005-05-02 14:17:18 +0200 (Mon, 02 May 2005)
New Revision: 220
Modified:
trunk/nym3/Client/Main.py
Log:
Factor common keyring decoding code.
Modified: trunk/nym3/Client/Main.py
===================================================================
--- trunk/nym3/Client/Main.py 2005-05-02 12:04:43 UTC (rev 219)
+++ trunk/nym3/Client/Main.py 2005-05-02 12:17:18 UTC (rev 220)
@@ -267,12 +267,7 @@
relayc = Message.Relay()
relayc.fromData(Message.intToStrBE(rt, 2), ri, body)
try:
- secring = Keyring.Keyring(config.secring_path)
- ui.display("You need to provide your passphrase to unlock your keyring")
- while True:
- passphrase1 = ui.prompthidden("Passphrase")
- if secring.decrypt(passphrase1): break
- ui.display("wrong passphrase")
+ secring = decode_secring(config, ui)
except Keyring.NewKeyring:
# The Keyring is new. That shouldn't happen
raise Exception('Bug keyring?')
@@ -297,12 +292,7 @@
summ = Message.Summarize()
summ.fromData(max, older)
try:
- secring = Keyring.Keyring(config.secring_path)
- ui.display("You need to provide your passphrase to unlock your keyring")
- while True:
- passphrase1 = ui.prompthidden("Passphrase")
- if secring.decrypt(passphrase1): break
- ui.display("wrong passphrase")
+ secring = decode_secring(config, ui)
except Keyring.NewKeyring:
# The Keyring is new. That shouldn't happen
raise Exception('Bug keyring?')
More information about the Nym3-commit
mailing list