From: Pekka Riikonen Date: Fri, 11 Oct 2002 20:27:14 +0000 (+0000) Subject: Check for signature errors. X-Git-Tag: silc.client.0.9.6~28 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=8b1693b24f3570b05d340efbfb4faa620654ff65;p=silc.git Check for signature errors. --- diff --git a/apps/silcd/server_query.c b/apps/silcd/server_query.c index 81b460e3..9fdd184a 100644 --- a/apps/silcd/server_query.c +++ b/apps/silcd/server_query.c @@ -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;