+
+ if (strcmp(opt->longName, "passphrase-change") == 0) {
+ /* Change the passphrase of the private key file */
+ silc_cipher_register_default();
+ silc_pkcs_register_default();
+ silc_hash_register_default();
+ silc_hmac_register_default();
+ silc_change_private_key_passphrase(arg, NULL, NULL);
+ exit(0);
+ }
+
+ if (strcmp(opt->longName, "show-key") == 0) {
+ /* Dump the key */
+ silc_cipher_register_default();
+ silc_pkcs_register_default();
+ silc_hash_register_default();
+ silc_hmac_register_default();
+ silc_show_public_key((char *)arg);
+ exit(0);
+ }
+}
+
+static void sig_init_finished(void)
+{
+ /* Check ~/.silc directory and public and private keys */
+ if (!silc_client_check_silc_dir()) {
+ idletag = -1;
+ exit(1);
+ }
+
+ /* Load public and private key */
+ if (!silc_client_load_keys(silc_client)) {
+ idletag = -1;
+ exit(1);
+ }
+
+ /* Initialize the SILC client */
+ if (!silc_client_init(silc_client)) {
+ idletag = -1;
+ exit(1);
+ }