X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fsilcd.c;h=b0155df1edd9990043a43a63324a18cb3297812b;hb=fde8aa8c7b1952d14fe9275ae36836fe995ea943;hp=c110a649b3be9aa0b5737eacee7a7c9d71f21b0d;hpb=4c0b87583da634b12c5745baa19c7ec42e30376c;p=silc.git diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index c110a649..b0155df1 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -526,7 +526,7 @@ int main(int argc, char **argv) silc_hash_register_default(); silc_hmac_register_default(); silc_create_key_pair(opt_pkcs, opt_bits, pubfile, prvfile, - opt_identifier, NULL, NULL, NULL, FALSE); + opt_identifier, "", NULL, NULL, NULL, FALSE); exit(0); } @@ -539,12 +539,25 @@ int main(int argc, char **argv) if (ret == FALSE) goto fail; + /* Register default crypto stuff since we are going to need them + in the configuration file parsing phase */ + silc_cipher_register_default(); + silc_pkcs_register_default(); + silc_hash_register_default(); + silc_hmac_register_default(); + /* Read configuration files */ silcd->config = silc_server_config_alloc(silcd_config_file); if (silcd->config == NULL) goto fail; silcd->config_file = silcd_config_file; + /* Unregister the default crypto stuff so that configuration takes effect */ + silc_cipher_unregister_all(); + silc_pkcs_unregister_all(); + silc_hash_unregister_all(); + silc_hmac_unregister_all(); + /* Check for another silcd running */ silc_server_checkpid(silcd);