new menus for account management

During startup, it is checked, if the game account needs to be unlocked
by password. If so, the password is asked and applied.

If no game account exists yet, the creation of a new account is offered.

new command "mypubkey": returns public key of game account, or empty
  string, if no account exists or it is unusable (due to missing password,
  for example)

DOCREF mypubkey
This commit is contained in:
ac-stef
2016-08-26 14:28:54 +02:00
parent 989db7d5c8
commit c4b570e8fd
4 changed files with 52 additions and 1 deletions
+9
View File
@@ -880,6 +880,15 @@ void authsetup(char **args, int numargs) // set up private and public keys
}
COMMAND(authsetup, "v");
void mypubkey()
{
string res = "";
if(sk) bin2hex(res, sk + 32, 32);
result(res);
}
COMMAND(mypubkey, "");
///////////////////////////////////////////////// misc key management //////////////////////////////////////////////////////
// * used to sign certs or other stuff
// * dev/admin/master keys