From: Jochen Eisinger Date: Wed, 10 Mar 2004 17:36:27 +0000 (+0000) Subject: Wed Mar 10 18:35:24 CET 2004 Jochen Eisinger X-Git-Tag: silc.server.0.9.19~83 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=fcce2435c689e450e186f2ee17134e0a4db51a39;p=silc.git Wed Mar 10 18:35:24 CET 2004 Jochen Eisinger * Removed expiring of client key pair. Affected file is irssi/src/silc/core/clientutil.c --- diff --git a/CHANGES b/CHANGES index bc8cdf6d..61012997 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Wed Mar 10 18:35:24 CET 2004 Jochen Eisinger + + * Removed expiring of client key pair. Affected file is + irssi/src/silc/core/clientutil.c + Tue Mar 9 17:11:58 EET 2004 Pekka Riikonen * Check the number of connections from real number of diff --git a/apps/irssi/src/silc/core/clientutil.c b/apps/irssi/src/silc/core/clientutil.c index 74c41837..7118e5cc 100644 --- a/apps/irssi/src/silc/core/clientutil.c +++ b/apps/irssi/src/silc/core/clientutil.c @@ -83,9 +83,8 @@ void silc_client_list_pkcs() /* This checks stats for various SILC files and directories. First it checks if ~/.silc directory exist and is owned by the correct user. If it doesn't exist, it will create the directory. After that it checks if - user's Public and Private key files exists and that they aren't expired. - If they doesn't exist or they are expired, they will be (re)created - after return. */ + user's Public and Private key files exists. If they doesn't exist they + will be created after return. */ int silc_client_check_silc_dir() { @@ -93,7 +92,6 @@ int silc_client_check_silc_dir() char servfilename[256], clientfilename[256], friendsfilename[256]; struct stat st; struct passwd *pw; - time_t curtime, modtime; SILC_LOG_DEBUG(("Checking ~./silc directory")); @@ -288,50 +286,6 @@ int silc_client_check_silc_dir() fprintf(stderr, "Done.\n\n"); } - /* See if the key has expired. */ - modtime = st.st_mtime; /* last modified */ - curtime = time(0) - modtime; - - /* 86400 is seconds in a day. */ - if (curtime >= (86400 * SILC_CLIENT_KEY_EXPIRES)) { - char answer; - - fprintf(stdout, - "----------------------------------------------------\n" - "Your private key has expired and needs to be\n" - "recreated. Would you like to create a new key pair\n" - "now? If you answer Yes, the new key will expire in\n" - "%d days from today. If you answer No, the old key\n" - "will expire again in %d days from today.\n" - "----------------------------------------------------\n", - SILC_CLIENT_KEY_EXPIRES, SILC_CLIENT_KEY_EXPIRES); - - fprintf(stdout, "Would you like to create a new key pair (y/n)?: "); - answer = getchar(); - - while ((answer != 'y') && (answer != 'Y') && (answer != 'n') && (answer != 'N')) { - while (answer != '\n') answer = getchar(); - fprintf(stdout, "Answer 'y' or 'n' and press \n"); - fprintf(stdout, "Would you like to create a new key pair (y/n)?: "); - answer = getchar(); - } - if (answer == 'Y' || answer == 'y') { - silc_create_key_pair(SILC_CLIENT_DEF_PKCS, - SILC_CLIENT_DEF_PKCS_LEN, - file_public_key, file_private_key, NULL, - NULL, NULL, NULL, NULL, FALSE); - printf("Press to continue...\n"); - getchar(); - } else { -#ifdef HAVE_UTIME - struct utimbuf utim; - utim.actime = time(NULL); - utim.modtime = time(NULL); - utime(file_private_key, &utim); -#endif - } - } - return TRUE; }