From: Pekka Riikonen Date: Sat, 21 Jul 2007 17:18:20 +0000 (+0000) Subject: Reverted the RNG argument from silc_pkcs_verify. X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=6d23bd9afca4d3552444229d89f1208c132198db Reverted the RNG argument from silc_pkcs_verify. --- diff --git a/apps/irssi/src/silc/core/silc-queries.c b/apps/irssi/src/silc/core/silc-queries.c index e67b666e..664eece6 100644 --- a/apps/irssi/src/silc/core/silc-queries.c +++ b/apps/irssi/src/silc/core/silc-queries.c @@ -854,7 +854,6 @@ void silc_query_attributes_print(SILC_SERVER_REC *server, if (verifyd) silc_pkcs_verify(verify->public_key, usersign.data, usersign.data_len, verifyd, verify_len, sha1hash, - silc_client->rng, silc_query_attributes_verify, &verified); if (verified) { @@ -899,7 +898,6 @@ void silc_query_attributes_print(SILC_SERVER_REC *server, if (verifyd) silc_pkcs_verify(public_key, serversign.data, serversign.data_len, verifyd, verify_len, sha1hash, - silc_client->rng, silc_query_attributes_verify, &verified); if (verified) { printformat_module("fe-common/silc", server, NULL, diff --git a/lib/silcacc/softacc.c b/lib/silcacc/softacc.c index af3a1a2b..072d7da8 100644 --- a/lib/silcacc/softacc.c +++ b/lib/silcacc/softacc.c @@ -299,7 +299,7 @@ void silc_softacc_thread(SilcSchedule schedule, void *context) case SILC_SOFTACC_VERIFY: silc_pkcs_verify(e->key.public_key, e->src, e->src_len, e->data, - e->data_len, e->hash, e->rng, silc_softacc_verify_cb, e); + e->data_len, e->hash, silc_softacc_verify_cb, e); break; } } @@ -476,6 +476,7 @@ SILC_PKCS_ALG_SIGN(silc_softacc_sign) e->stack = stack; e->type = SILC_SOFTACC_SIGN; + e->rng = rng; e->src = silc_smemdup(stack, src, src_len); e->src_len = src_len; e->compute_hash = compute_hash; diff --git a/lib/silccore/silcauth.c b/lib/silccore/silcauth.c index d14899d3..72cce5aa 100644 --- a/lib/silccore/silcauth.c +++ b/lib/silccore/silcauth.c @@ -409,7 +409,7 @@ silc_auth_public_key_auth_verify(SilcAuthPayload payload, /* Verify the authentication data */ op = silc_pkcs_verify(public_key, payload->auth_data, - payload->auth_len, tmp, tmp_len, hash, NULL, + payload->auth_len, tmp, tmp_len, hash, result, context); memset(tmp, 0, tmp_len); diff --git a/lib/silccore/silcmessage.c b/lib/silccore/silcmessage.c index 2b817ba7..ec0dbf9c 100644 --- a/lib/silccore/silcmessage.c +++ b/lib/silccore/silcmessage.c @@ -878,7 +878,7 @@ silc_message_signed_verify(SilcMessagePayload message, /* Verify the authentication data */ op = silc_pkcs_verify(remote_public_key, sig->sign_data, sig->sign_len, silc_buffer_data(sign), silc_buffer_len(sign), - hash, NULL, result, context); + hash, result, context); silc_buffer_clear(sign); silc_buffer_sfree(stack, sign); diff --git a/lib/silccrypt/silcpkcs.c b/lib/silccrypt/silcpkcs.c index c43f089b..46eb84b9 100644 --- a/lib/silccrypt/silcpkcs.c +++ b/lib/silccrypt/silcpkcs.c @@ -732,13 +732,12 @@ SilcAsyncOperation silc_pkcs_verify(SilcPublicKey public_key, unsigned char *data, SilcUInt32 data_len, SilcHash hash, - SilcRng rng, SilcPKCSVerifyCb verify_cb, void *context) { return public_key->pkcs->verify(public_key->pkcs, public_key->public_key, signature, - signature_len, data, data_len, hash, rng, + signature_len, data, data_len, hash, NULL, verify_cb, context); } diff --git a/lib/silccrypt/silcpkcs.h b/lib/silccrypt/silcpkcs.h index fa3230ee..978da199 100644 --- a/lib/silccrypt/silcpkcs.h +++ b/lib/silccrypt/silcpkcs.h @@ -675,7 +675,6 @@ SilcAsyncOperation silc_pkcs_sign(SilcPrivateKey private_key, * unsigned char *data, * SilcUInt32 data_len, * SilcHash hash, - * SilcRng rng, * SilcPKCSVerifyCb verify_cb, * void *context); * @@ -687,9 +686,8 @@ SilcAsyncOperation silc_pkcs_sign(SilcPrivateKey private_key, * before verification. If the `hash' is NULL, then the hash algorithm * to be used is retrieved from the signature. If it isn't present in the * signature the verification is done as is without hashing. The `rng' - * is usually not needed, however some algorithms might need it so it is - * wise to provide it. If this returns NULL the asynchronous operation - * cannot be controlled. + * is usually not needed and may be NULL. If this returns NULL the + * asynchronous operation cannot be controlled. * ***/ SilcAsyncOperation silc_pkcs_verify(SilcPublicKey public_key, @@ -698,7 +696,6 @@ SilcAsyncOperation silc_pkcs_verify(SilcPublicKey public_key, unsigned char *data, SilcUInt32 data_len, SilcHash hash, - SilcRng rng, SilcPKCSVerifyCb verify_cb, void *context); diff --git a/lib/silcske/silcconnauth.c b/lib/silcske/silcconnauth.c index 6b43421d..34af6824 100644 --- a/lib/silcske/silcconnauth.c +++ b/lib/silcske/silcconnauth.c @@ -210,7 +210,7 @@ silc_connauth_verify_signature(SilcConnAuth connauth, /* Verify signature */ op = silc_pkcs_verify(pub_key, sign, sign_len, auth->data, - silc_buffer_len(auth), ske->prop->hash, ske->rng, + silc_buffer_len(auth), ske->prop->hash, silc_connauth_verify_signature_cb, connauth); silc_buffer_free(auth); diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index b0147f22..02d0961c 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -1717,7 +1717,7 @@ SILC_FSM_STATE(silc_ske_st_initiator_phase4) SILC_FSM_CALL(ske->key_op = silc_pkcs_verify(ske->prop->public_key, payload->sign_data, payload->sign_len, hash, hash_len, NULL, - ske->rng, silc_ske_verify_cb, ske)); + silc_ske_verify_cb, ske)); /* NOT REACHED */ } @@ -2247,7 +2247,7 @@ SILC_FSM_STATE(silc_ske_st_responder_phase4) silc_pkcs_verify(ske->prop->public_key, recv_payload->sign_data, recv_payload->sign_len, - hash, hash_len, NULL, ske->rng, + hash, hash_len, NULL, silc_ske_verify_cb, ske)); /* NOT REACHED */ }