From 6d93cf8de208ac257349250b336a6fa4b17395fe Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 18 Sep 2003 15:50:16 +0000 Subject: [PATCH] Do not accept accidental Enter presses to key expire question. --- apps/irssi/src/silc/core/clientutil.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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, -- 2.43.0