Longer default PKCS keys
[silc.git] / apps / silcd / server_query.c
index f3337770ce776b01101d33dc615f656b36c44f36..15a536ac88e232db62dd13dc4a41fdfde878cbb0 100644 (file)
@@ -238,6 +238,8 @@ SilcBool silc_server_query_command(SilcServer server,
 
   if (!old_query) {
     query = silc_calloc(1, sizeof(*query));
+    if (!query)
+      return FALSE;
     query->querycmd = querycmd;
     query->cmd = silc_server_command_dup(cmd);
     query->router = SILC_PRIMARY_ROUTE(server);
@@ -508,6 +510,8 @@ SilcBool silc_server_query_parse(SilcServer server, SilcServerQuery query,
     } else {
       /* Parse the IDs included in the query */
       query->ids = silc_calloc(argc, sizeof(*query->ids));
+      if (!query->ids)
+       return FALSE;
 
       for (i = 0; i < argc; i++) {
        tmp = silc_argument_get_arg_type(cmd->args, i + 4, &tmp_len);
@@ -663,6 +667,8 @@ SilcBool silc_server_query_parse(SilcServer server, SilcServerQuery query,
     } else {
       /* Parse the IDs included in the query */
       query->ids = silc_calloc(argc, sizeof(*query->ids));
+      if (!query->ids)
+       return FALSE;
 
       for (i = 0; i < argc; i++) {
        tmp = silc_argument_get_arg_type(cmd->args, i + 5, &tmp_len);
@@ -797,6 +803,7 @@ static void silc_server_query_skr_callback(SilcSKR skr,
   SilcSKRKey key;
 
   if (keys) {
+    SILC_LOG_DEBUG(("Found %d keys", silc_dlist_count(keys)));
     (*uc->clients) = silc_realloc((*uc->clients),
                                  sizeof((**uc->clients)) *
                                  ((*uc->clients_count) +
@@ -1998,7 +2005,7 @@ SilcBuffer silc_server_query_reply_attrs(SilcServer server,
   SilcAttributeObjPk pk;
   SilcAttributeObjService service;
   unsigned char *tmp;
-  unsigned char sign[2048 + 1];
+  unsigned char sign[65536 + 1];
   SilcUInt32 sign_len;
 
   SILC_LOG_DEBUG(("Constructing Requested Attributes"));