From: Pekka Riikonen Date: Tue, 23 Jan 2007 14:52:01 +0000 (+0000) Subject: silc_pkcs_sign API change, requires hash pointer as argument. X-Git-Tag: silc.client.1.1.beta1~49 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=0e0503a0c47a3950e0c8e65af965499e3ac270aa silc_pkcs_sign API change, requires hash pointer as argument. --- diff --git a/lib/silccore/silcargument.c b/lib/silccore/silcargument.c index aae2a6ef..a98726f8 100644 --- a/lib/silccore/silcargument.c +++ b/lib/silccore/silcargument.c @@ -355,7 +355,7 @@ static SilcBool silc_argument_decode(unsigned char *data, break; case SILC_ARGUMENT_BOOL: - if (data_len != 1) + if (data_len != sizeof(SilcBool)) return FALSE; if (ret_arg) { diff --git a/lib/silccore/silcauth.c b/lib/silccore/silcauth.c index 25aadd8f..da2a502f 100644 --- a/lib/silccore/silcauth.c +++ b/lib/silccore/silcauth.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2001 - 2006 Pekka Riikonen + Copyright (C) 2001 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -290,7 +290,7 @@ silc_auth_public_key_auth_generate_wpub(SilcPublicKey public_key, /* Compute the hash and the signature. */ if (!silc_pkcs_sign(private_key, tmp, tmp_len, auth_data, - sizeof(auth_data) - 1, &auth_len, hash)) { + sizeof(auth_data) - 1, &auth_len, TRUE, hash)) { memset(tmp, 0, tmp_len); silc_free(tmp); return NULL; diff --git a/lib/silccore/silcmessage.c b/lib/silccore/silcmessage.c index 19c1959e..2bb3ef9e 100644 --- a/lib/silccore/silcmessage.c +++ b/lib/silccore/silcmessage.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2006 Pekka Riikonen + Copyright (C) 1997 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -207,7 +207,8 @@ silc_message_signed_payload_encode(const unsigned char *message_payload, /* Compute the hash and the signature. */ if (!silc_pkcs_sign(private_key, sign->data, silc_buffer_len(sign), - auth_data, sizeof(auth_data) - 1, &auth_len, hash)) { + auth_data, sizeof(auth_data) - 1, &auth_len, + TRUE, hash)) { SILC_LOG_ERROR(("Could not compute signature")); silc_buffer_clear(sign); silc_buffer_free(sign);