From 8b1693b24f3570b05d340efbfb4faa620654ff65 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 11 Oct 2002 20:27:14 +0000 Subject: [PATCH] Check for signature errors. --- apps/silcd/server_query.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.43.0