diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-01 16:40:02 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-17 10:11:18 -0400 |
commit | b6eee531bb546683387fb471b754f24bc40580d0 (patch) | |
tree | bdfd45d429c8869ee4410592fe15a8b58c9af123 /src/or/main.c | |
parent | cbdf2c5d8f6fcce432e2355f406ca9e3c2340a5b (diff) | |
download | tor-b6eee531bb546683387fb471b754f24bc40580d0.tar.gz tor-b6eee531bb546683387fb471b754f24bc40580d0.zip |
Support encrypted offline master keys with a new --keygen flag
When --keygen is provided, we prompt for a passphrase when we make a
new master key; if it is nonempty, we store the secret key in a new
crypto_pwbox.
Also, if --keygen is provided and there *is* an encrypted master key,
we load it and prompt for a passphrase unconditionally.
We make a new signing key unconditionally when --keygen is provided.
We never overwrite a master key.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index bbee8e0fb9..d9ef88b36f 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -3162,6 +3162,9 @@ tor_main(int argc, char *argv[]) #endif result = do_main_loop(); break; + case CMD_KEYGEN: + result = load_ed_keys(get_options(), time(NULL)); + break; case CMD_LIST_FINGERPRINT: result = do_list_fingerprint(); break; |