projects
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e6e2831
)
Reverted the RNG argument from silc_pkcs_verify.
author
Pekka Riikonen
<priikone@silcnet.org>
Sat, 21 Jul 2007 17:18:20 +0000
(17:18 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sat, 21 Jul 2007 17:18:20 +0000
(17:18 +0000)
apps/irssi/src/silc/core/silc-queries.c
patch
|
blob
|
history
lib/silcacc/softacc.c
patch
|
blob
|
history
lib/silccore/silcauth.c
patch
|
blob
|
history
lib/silccore/silcmessage.c
patch
|
blob
|
history
lib/silccrypt/silcpkcs.c
patch
|
blob
|
history
lib/silccrypt/silcpkcs.h
patch
|
blob
|
history
lib/silcske/silcconnauth.c
patch
|
blob
|
history
lib/silcske/silcske.c
patch
|
blob
|
history
diff --git
a/apps/irssi/src/silc/core/silc-queries.c
b/apps/irssi/src/silc/core/silc-queries.c
index e67b666ef8e0f6a2f1f0a23c3fbd4af2aa6d23e8..664eece66117fdb6cffb98d86b102a625c533fe8 100644
(file)
--- 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,
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) {
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,
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,
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 af3a1a2be628fbb4b3ebea1253d9b02b372e9745..072d7da8280c0ce9bb20135fec03c925d8003968 100644
(file)
--- 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,
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;
}
}
break;
}
}
@@
-476,6
+476,7
@@
SILC_PKCS_ALG_SIGN(silc_softacc_sign)
e->stack = stack;
e->type = 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;
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 d14899d33a12f17ccbf55cacffbec65d3072b2e8..72cce5aad9492891f625afb0202368eb6173c8f6 100644
(file)
--- 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,
/* 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);
result, context);
memset(tmp, 0, tmp_len);
diff --git
a/lib/silccore/silcmessage.c
b/lib/silccore/silcmessage.c
index 2b817ba708c79f8232272163659e0269db427f2e..ec0dbf9c032e4f463878d948f68569795a503939 100644
(file)
--- 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),
/* 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);
silc_buffer_clear(sign);
silc_buffer_sfree(stack, sign);
diff --git
a/lib/silccrypt/silcpkcs.c
b/lib/silccrypt/silcpkcs.c
index c43f089bd80144db9402a84a5fbdd9785b939818..46eb84b97e0cf0afc6bea703e8738efac900352a 100644
(file)
--- 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,
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,
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);
}
verify_cb, context);
}
diff --git
a/lib/silccrypt/silcpkcs.h
b/lib/silccrypt/silcpkcs.h
index fa3230eea55b9671f183c36ca16b5d6933e5ff6a..978da199882dc82c95cac8b3a2e4d24de3f60eab 100644
(file)
--- 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,
* unsigned char *data,
* SilcUInt32 data_len,
* SilcHash hash,
- * SilcRng rng,
* SilcPKCSVerifyCb verify_cb,
* void *context);
*
* 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'
* 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,
*
***/
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,
unsigned char *data,
SilcUInt32 data_len,
SilcHash hash,
- SilcRng rng,
SilcPKCSVerifyCb verify_cb,
void *context);
SilcPKCSVerifyCb verify_cb,
void *context);
diff --git
a/lib/silcske/silcconnauth.c
b/lib/silcske/silcconnauth.c
index 6b43421daa259c1f9dd5adc3de1884f0feda9803..34af68242c9f5aefede126b2ee113943960df416 100644
(file)
--- 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,
/* 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);
silc_connauth_verify_signature_cb, connauth);
silc_buffer_free(auth);
diff --git
a/lib/silcske/silcske.c
b/lib/silcske/silcske.c
index b0147f22a65ef1c575983578ef3bc33b64341c7c..02d0961cfe9c85f1ae8f479cdbaf98496703af92 100644
(file)
--- 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,
SILC_FSM_CALL(ske->key_op =
silc_pkcs_verify(ske->prop->public_key, payload->sign_data,
payload->sign_len, hash, hash_len, NULL,
- s
ke->rng, s
ilc_ske_verify_cb, ske));
+ silc_ske_verify_cb, ske));
/* NOT REACHED */
}
/* 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,
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 */
}
silc_ske_verify_cb, ske));
/* NOT REACHED */
}