Changed SILC code to use new SRT and SCT APIs.
[silc.git] / lib / silccore / silcauth.c
index 5082162e75051d35993382aaa4df794b7a947602..f2c73f0ece9fad49a5081d464595d561760068db 100644 (file)
@@ -312,7 +312,7 @@ silc_auth_public_key_auth_generate(SilcPublicKey public_key,
 
   return silc_auth_public_key_auth_generate_wpub(public_key, private_key,
                                                 randomdata, sizeof(randomdata),
-                                                hash, id, type, generated,
+                                                hash, rng, id, type, generated,
                                                 context);
 }
 
@@ -326,6 +326,7 @@ silc_auth_public_key_auth_generate_wpub(SilcPublicKey public_key,
                                        const unsigned char *pubdata,
                                        SilcUInt32 pubdata_len,
                                        SilcHash hash,
+                                       SilcRng rng,
                                        const void *id, SilcIdType type,
                                        SilcAuthGenerated generated,
                                        void *context)
@@ -369,8 +370,8 @@ silc_auth_public_key_auth_generate_wpub(SilcPublicKey public_key,
   }
 
   /* Compute the hash and the signature. */
-  op = silc_pkcs_sign(private_key, tmp, tmp_len, TRUE, hash,
-                     silc_auth_public_key_auth_generate_cb, a);
+  op = silc_pkcs_sign_async(private_key, tmp, tmp_len, TRUE, hash, rng,
+                           silc_auth_public_key_auth_generate_cb, a);
 
   memset(tmp, 0, tmp_len);
   silc_sfree(stack, tmp);
@@ -407,9 +408,9 @@ 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,
-                       result, context);
+  op = silc_pkcs_verify_async(public_key, payload->auth_data,
+                             payload->auth_len, tmp, tmp_len, TRUE, hash,
+                             result, context);
 
   memset(tmp, 0, tmp_len);
   silc_sfree(payload->stack, tmp);