client.c
- Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+ Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2000 Pekka Riikonen
+ Copyright (C) 1997 - 2002 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
SilcPrivateKey prv_key;
SilcRng rng;
unsigned char *key;
- uint32 key_len;
+ SilcUInt32 key_len;
char line[256];
char *pkfile = NULL, *prvfile = NULL;
memset(file_public_key, 0, sizeof(file_public_key));
memset(file_private_key, 0, sizeof(file_private_key));
+ identifier = silc_client_create_identifier();
+
pw = getpwuid(getuid());
if (!pw) {
fprintf(stderr, "silc: %s\n", strerror(errno));
+ if (identifier)
+ silc_free(identifier);
return FALSE;
}
- identifier = silc_client_create_identifier();
-
/* We'll take home path from /etc/passwd file to be sure. */
snprintf(filename, sizeof(filename) - 1, "%s/.silc/", pw->pw_dir);
snprintf(servfilename, sizeof(servfilename) - 1, "%s/.silc/serverkeys",
SilcPublicKeyIdentifier ident;
char *fingerprint, *babbleprint;
unsigned char *pk;
- uint32 pk_len;
+ SilcUInt32 pk_len;
SilcPKCS pkcs;
int key_len = 0;
fflush(stdout);
silc_free(fingerprint);
+ silc_free(babbleprint);
silc_free(pk);
silc_pkcs_public_key_free(public_key);
silc_pkcs_free_identifier(ident);