Check for signature errors.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 11 Oct 2002 20:27:14 +0000 (20:27 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 11 Oct 2002 20:27:14 +0000 (20:27 +0000)
apps/silcd/server_query.c

index 81b460e3281633eb51bde77fc656720bdc588582..9fdd184a2de6266efd13a30203b114d80a744461 100644 (file)
@@ -1628,7 +1628,8 @@ SilcBuffer silc_server_query_reply_attrs(SilcServer server,
   /* Finally compute the digital signature of all the data we provided
      as an indication that we provided rightfull information, and this
      also authenticates our public key. */
-  if (silc_pkcs_sign_with_hash(server->pkcs, server->sha1hash,
+  if (silc_pkcs_get_key_len(server->pkcs) <= sizeof(sign) -1  &&
+      silc_pkcs_sign_with_hash(server->pkcs, server->sha1hash,
                               buffer->data, buffer->len,
                               sign, &sign_len)) {
     pk.type = NULL;