Integer type name change.
[silc.git] / apps / silc / silc.c
index fc1ff725a56cde12e28e92403c9af91d085bf8c9..e449af1d89883c03da6294b2bcbcd146017e7f21 100644 (file)
@@ -246,6 +246,10 @@ SILC Secure Internet Live Conferencing, version %s\n",
 
   if (opt_create_keypair == TRUE) {
     /* Create new key pair and exit */
+    silc_cipher_register_default();
+    silc_pkcs_register_default();
+    silc_hash_register_default();
+    silc_hmac_register_default();
     silc_client_create_key_pair(opt_pkcs, opt_bits, 
                                NULL, NULL, NULL, NULL, NULL);
     silc_free(opt_pkcs);
@@ -254,6 +258,10 @@ SILC Secure Internet Live Conferencing, version %s\n",
 
   if (opt_show_key == TRUE) {
     /* Dump the key */
+    silc_cipher_register_default();
+    silc_pkcs_register_default();
+    silc_hash_register_default();
+    silc_hmac_register_default();
     silc_client_show_key(opt_keyfile);
     silc_free(opt_keyfile);
     exit(0);
@@ -267,7 +275,7 @@ SILC Secure Internet Live Conferencing, version %s\n",
   app = silc_calloc(1, sizeof(*app));
 
   /* Allocate new client */
-  app->client = silc = silc_client_alloc(&ops, app);
+  app->client = silc = silc_client_alloc(&ops, app, silc_version_string);
   if (!silc)
     goto fail;
 
@@ -276,10 +284,6 @@ SILC Secure Internet Live Conferencing, version %s\n",
 
   /* XXX Read local configuration file */
 
-  /* Check ~/.silc directory and public and private keys */
-  if (silc_client_check_silc_dir() == FALSE)
-    goto fail;
-
   /* Get user information */
   silc->username = silc_get_username();
   silc->hostname = silc_net_localhost();
@@ -304,6 +308,10 @@ SILC Secure Internet Live Conferencing, version %s\n",
     silc_hmac_register_default();
   }
 
+  /* Check ~/.silc directory and public and private keys */
+  if (silc_client_check_silc_dir() == FALSE)
+    goto fail;
+
   /* Load public and private key */
   if (silc_client_load_keys(silc) == FALSE)
     goto fail;
@@ -541,7 +549,7 @@ static void silc_client_clear_input(SilcClientInternal app)
 static void silc_client_process_message(SilcClientInternal app)
 {
   unsigned char *data;
-  uint32 len;
+  SilcUInt32 len;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -550,9 +558,9 @@ static void silc_client_process_message(SilcClientInternal app)
 
   if (data[0] == '/' && data[1] != ' ') {
     /* Command */
-    uint32 argc = 0;
+    SilcUInt32 argc = 0;
     unsigned char **argv, *tmpcmd;
-    uint32 *argv_lens, *argv_types;
+    SilcUInt32 *argv_lens, *argv_types;
     SilcClientCommand *cmd;
     SilcClientCommandContext ctx;
 
@@ -650,9 +658,9 @@ SILC_TASK_CALLBACK(silc_client_run_commands)
 
   cs = app->config->commands;
   while(cs) {
-    uint32 argc = 0;
+    SilcUInt32 argc = 0;
     unsigned char **argv, *tmpcmd;
-    uint32 *argv_lens, *argv_types;
+    SilcUInt32 *argv_lens, *argv_types;
     SilcClientCommand *cmd;
     SilcClientCommandContext ctx;