Commit 330cbf82 authored by putro's avatar putro

added function to delete nym from local config, updated README

parent 46abfec9
......@@ -18,12 +18,33 @@ change mixmaster, nymservers and stats section if needed
do not edit the nym section, unless you know what you are doing.
launch the script ./autonym.py and follow the onscreen instruction
remember to keep your stats & keys in your local mixmaster updated
menu option available:
- choose/select active nym
if you manage more than one nym, set the active one (i.e. that used to send a message)
- write a message
send a message from active nym, it uses a minimal graphical interface to write message
if the recipient public key is in your keyring, message is encrypted.
- create a nym
ask you name and domain of the nym to be created
if a key for that address does not exist, it is created
creation message is sent not signed to the nymserver through local mixmaster
- update a nym
ask you new subject_type and subject to be used with choosen nym and send
an update request to the nymserver through local mixmaster
- delete a nym
send a request to delete nym
- create a new secret key
help you to create a secret key (usually not used as the create nym function will
automatically use this procedure if a key is needed).
- delete a nym secret key and config
function to delete a nym secret key from keyring and nym config from local config file (i.e. after nym deletion is confirmed)
- save the nym secret key passphrase in config file
so you don't have to type it every time
(obviously this is not a good thing, AT LEAST keep config.ini on an encrypted partition).
SECURITY NOTE:
you can save the nym secret key passphrase in config file (through menu option),
so you don't have to type it every time (obviously this is not a good thing,
AT LEAST keep config.ini on an encrypted partition).
remember to keep your stats & keys in your local mixmaster updated
......
......@@ -3,7 +3,7 @@
import os
import sys
import checks
from config import config, nyms, nymList, printNymList, configSection, writeConfig
from config import config, nyms, nymList, printNymList, configSection, writeConfig, delSection
import traceback
import re
from stats import parse_stats, stats_m, uptime_sort_m, format_stats
......@@ -53,7 +53,7 @@ def menu():
4 to update a nym (i.e. set new subject...)\n\
5 to delete a nym\n\
6 to create a new secret key\n\
7 to delete a secret key\n\
7 to delete a nym secret key and local config\n\
8 to save nym secret passphrase in config file (NOT SECURE)\n\
q to quit\n\n\n")
......@@ -83,11 +83,7 @@ def menu():
pressKey()
menu()
elif selection == "7":
sk = gpgfuncts.defineSecKey()
fp = sk["fingerprint"]
deleteKey(fp)
msg = "key of %s deleted" % sk["uids"][1]
config['last_message'] = msg
deleteNymKeysConfig()
menu()
elif selection == "8":
savePassword()
......@@ -179,6 +175,17 @@ def savePassword():
config['last_message'] = "Password for %s saved in config.ini file (not secure, use just for testing)"
def deleteNymKeysConfig():
askNym()
if not askYesNo('Are you sure you want to delete local config file and %s secret key ?: ' % anym.name):
menu()
gpgfuncts.deleteKey(anym.fp)
msg = "key and config of %s deleted" % anym.name
delSection(anym.name)
writeConfig()
config['last_message'] = msg
def prepareSetupMsg(keyid, subj_type, subject):
key = gpgfuncts.exportPubKey(keyid)
msg = "\n%s: %s\n\n" % (subj_type, subject) + key
......
......@@ -38,6 +38,8 @@ def configSection(nym, subject="", subj_type="", passphrase=""):
config['nym'][nym]['passphrase'] = passphrase
def delSection(nym):
del config['nym'][nym]
def checkNymConfig(nym):
return nyms.has_key(nym)
......
Markdown is supported
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