Reverted the RNG argument from silc_pkcs_verify.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2007 17:18:20 +0000 (17:18 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2007 17:18:20 +0000 (17:18 +0000)
apps/irssi/src/silc/core/silc-queries.c
lib/silcacc/softacc.c
lib/silccore/silcauth.c
lib/silccore/silcmessage.c
lib/silccrypt/silcpkcs.c
lib/silccrypt/silcpkcs.h
lib/silcske/silcconnauth.c
lib/silcske/silcske.c

index e67b666ef8e0f6a2f1f0a23c3fbd4af2aa6d23e8..664eece66117fdb6cffb98d86b102a625c533fe8 100644 (file)
@@ -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,
index af3a1a2be628fbb4b3ebea1253d9b02b372e9745..072d7da8280c0ce9bb20135fec03c925d8003968 100644 (file)
@@ -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;
index d14899d33a12f17ccbf55cacffbec65d3072b2e8..72cce5aad9492891f625afb0202368eb6173c8f6 100644 (file)
@@ -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);
index 2b817ba708c79f8232272163659e0269db427f2e..ec0dbf9c032e4f463878d948f68569795a503939 100644 (file)
@@ -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);
index c43f089bd80144db9402a84a5fbdd9785b939818..46eb84b97e0cf0afc6bea703e8738efac900352a 100644 (file)
@@ -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);
 }
 
index fa3230eea55b9671f183c36ca16b5d6933e5ff6a..978da199882dc82c95cac8b3a2e4d24de3f60eab 100644 (file)
@@ -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);
 
index 6b43421daa259c1f9dd5adc3de1884f0feda9803..34af68242c9f5aefede126b2ee113943960df416 100644 (file)
@@ -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);
index b0147f22a65ef1c575983578ef3bc33b64341c7c..02d0961cfe9c85f1ae8f479cdbaf98496703af92 100644 (file)
@@ -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 */
   }