From: Pekka Riikonen Date: Thu, 18 Sep 2003 15:50:16 +0000 (+0000) Subject: Do not accept accidental Enter presses to key expire question. X-Git-Tag: silc.toolkit.0.9.10~39 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=6d93cf8de208ac257349250b336a6fa4b17395fe;p=silc.git Do not accept accidental Enter presses to key expire question. --- diff --git a/apps/irssi/src/silc/core/clientutil.c b/apps/irssi/src/silc/core/clientutil.c index 818444dd..8f163932 100644 --- a/apps/irssi/src/silc/core/clientutil.c +++ b/apps/irssi/src/silc/core/clientutil.c @@ -307,8 +307,13 @@ int silc_client_check_silc_dir() SILC_CLIENT_KEY_EXPIRES, SILC_CLIENT_KEY_EXPIRES); answer = silc_get_input("Would you like to create a new key pair " - "([y]/n)?: ", FALSE); - if (!answer || answer[0] == 'Y' || answer[0] == 'y') { + "(y/n)?: ", FALSE); + while (!answer) { + printf("Answer 'y' or 'n' and press Enter\n"); + answer = silc_get_input("Would you like to create a new key pair " + "(y/n)?: ", FALSE); + } + if (answer[0] == 'Y' || answer[0] == 'y') { silc_create_key_pair(SILC_CLIENT_DEF_PKCS, SILC_CLIENT_DEF_PKCS_LEN, file_public_key, file_private_key, NULL,