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) {
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,
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;
}
}
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;
/* 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);
/* 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);
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);
}
* unsigned char *data,
* SilcUInt32 data_len,
* SilcHash hash,
- * SilcRng rng,
* SilcPKCSVerifyCb verify_cb,
* void *context);
*
* 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,
unsigned char *data,
SilcUInt32 data_len,
SilcHash hash,
- SilcRng rng,
SilcPKCSVerifyCb verify_cb,
void *context);
/* 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_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 */
}
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 */
}