Commit 4d09129a authored by putro's avatar putro
Browse files

added check for nymserver key

parent 5aa53b2c
......@@ -122,9 +122,14 @@ def createNym():
name = askSomething('Enter the name of the nym (without domain): ')
server = selectServer(config)
email = name + "@" + server
dest = "config@" + server
if not gpgfuncts.selectKey(dest):
config['last_message'] = "Server %s key not available, abort" % server
if not gpgfuncts.selectKey(email):
print "no key availabke, creating a new one for %s" % email
print "no key available, creating a new one for %s" % email
gpgfuncts.createKey(email, name)
subj_type = chooseSubjType(config)
......@@ -135,10 +140,11 @@ def createNym():
msg = prepareSetupMsg(gpgfuncts.selectSecKey(email), subj_type, subject)
dest = "config@" + server
print msg
emsg = signCryptMsg(msg, dest, sign=False)
if not emsg:
config['last_message'] = "Something went wrong"
config['last_message'] = "Something went wrong while preparing the message, recipient key missing ???"
sendMixMsg(dest, emsg)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment