-SilcAsyncOperation silc_pkcs_sign(SilcPrivateKey private_key,
- unsigned char *src,
- SilcUInt32 src_len,
- SilcBool compute_hash,
- SilcHash hash,
- SilcRng rng,
- SilcPKCSSignCb sign_cb,
- void *context)
+SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
+ unsigned char *src, SilcUInt32 src_len,
+ unsigned char *dst, SilcUInt32 dst_size,
+ SilcUInt32 *dst_len, SilcBool compute_hash,
+ SilcHash hash, SilcRng rng)
+{
+ SilcPKCSOperation ctx;
+
+ ctx.dst = dst;
+ ctx.dst_size = dst_size;
+ ctx.dst_len = dst_len;
+
+ private_key->pkcs->sign(private_key->pkcs,
+ private_key->private_key, src, src_len,
+ compute_hash, hash, rng,
+ silc_pkcs_op_cb, &ctx);
+
+ return ctx.result;
+}
+
+/* Generates signature, async */
+
+SilcAsyncOperation silc_pkcs_sign_async(SilcPrivateKey private_key,
+ unsigned char *src,
+ SilcUInt32 src_len,
+ SilcBool compute_hash,
+ SilcHash hash,
+ SilcRng rng,
+ SilcPKCSSignCb sign_cb,
+ void *context)