X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand_reply.c;h=22fe1f1c9b78ac305d8bfde08bdf6efb5f57b80a;hb=f5ff7cf783e9df23f91fe5fcf3da13a1b8373311;hp=3696ec3accb78127416f2b8fa92c4f5eafaa4645;hpb=2ac34d9c9117bfe850122c00b3001fd1b8a5d88a;p=crypto.git diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index 3696ec3a..22fe1f1c 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -781,6 +781,7 @@ SILC_SERVER_CMD_REPLY_FUNC(join) char *channel_name, *tmp; SilcUInt32 mode, created; SilcBuffer keyp = NULL, client_id_list = NULL, client_mode_list = NULL; + SilcPublicKey founder_key = NULL; COMMAND_CHECK_STATUS; @@ -860,6 +861,11 @@ SILC_SERVER_CMD_REPLY_FUNC(join) silc_buffer_pull_tail(client_mode_list, len); silc_buffer_put(client_mode_list, tmp, len); + /* Get founder key */ + tmp = silc_argument_get_arg_type(cmd->args, 15, &len); + if (tmp) + silc_pkcs_public_key_decode(tmp, len, &founder_key); + /* See whether we already have the channel. */ entry = silc_idlist_find_channel_by_name(server->local_list, channel_name, &cache); @@ -903,6 +909,13 @@ SILC_SERVER_CMD_REPLY_FUNC(join) } } + if (founder_key) { + if (entry->founder_key) + silc_pkcs_public_key_free(entry->founder_key); + entry->founder_key = founder_key; + founder_key = NULL; + } + if (entry->hmac_name && hmac) { silc_free(entry->hmac_name); entry->hmac_name = strdup(silc_hmac_get_name(hmac)); @@ -962,6 +975,7 @@ SILC_SERVER_CMD_REPLY_FUNC(join) silc_free(client_id); silc_server_command_reply_free(cmd); + silc_pkcs_public_key_free(founder_key); if (client_id_list) silc_buffer_free(client_id_list); if (client_mode_list)