Lines Matching defs:pd

67  *	pd:	pointer to the descriptor of the provider to use for this
100 kcf_provider_desc_t *pd = provider;
101 kcf_provider_desc_t *real_provider = pd;
104 ASSERT(KCF_PROV_REFHELD(pd));
106 if (pd->pd_prov_type == CRYPTO_LOGICAL_PROVIDER) {
108 CRYPTO_MECH_INVALID, NULL, pd, &real_provider,
119 if (pd->pd_prov_type == CRYPTO_LOGICAL_PROVIDER)
134 kcf_provider_desc_t *pd;
139 /* The pd is returned held */
140 if ((pd = kcf_get_mech_provider(mech->cm_type, NULL, NULL, &error,
148 if (CHECK_FASTPATH(crq, pd)) {
152 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech);
153 error = KCF_PROV_DIGEST_ATOMIC(pd, pd->pd_sid, &lmech, data,
155 KCF_PROV_INCRSTATS(pd, error);
157 if (pd->pd_prov_type == CRYPTO_HW_PROVIDER &&
158 (pd->pd_flags & CRYPTO_HASH_NO_UPDATE) &&
159 (data->cd_length > pd->pd_hash_limit)) {
163 pd->pd_sid, mech, NULL, data, digest);
166 error = kcf_submit_request(pd, NULL, crq, &params,
173 /* Add pd to the linked list of providers tried. */
174 if (kcf_insert_triedlist(&list, pd, KCF_KMFLAG(crq)) != NULL)
181 KCF_PROV_REFRELE(pd);
188 * pd: pointer to the descriptor of the provider to use for this
215 kcf_provider_desc_t *pd = provider;
216 kcf_provider_desc_t *real_provider = pd;
218 ASSERT(KCF_PROV_REFHELD(pd));
220 if (pd->pd_prov_type == CRYPTO_LOGICAL_PROVIDER) {
222 CRYPTO_MECH_INVALID, NULL, pd, &real_provider,
231 if (pd->pd_prov_type == CRYPTO_LOGICAL_PROVIDER)
237 if (CHECK_FASTPATH(crq, pd)) {
244 KCF_PROV_INCRSTATS(pd, error);
252 if (pd->pd_prov_type == CRYPTO_LOGICAL_PROVIDER)
276 kcf_provider_desc_t *pd;
280 /* The pd is returned held */
281 if ((pd = kcf_get_mech_provider(mech->cm_type, NULL, NULL, &error,
288 if (pd->pd_prov_type == CRYPTO_HW_PROVIDER &&
289 (pd->pd_flags & CRYPTO_HASH_NO_UPDATE)) {
300 error = crypto_digest_init_prov(pd, pd->pd_sid,
306 /* Add pd to the linked list of providers tried. */
307 if (kcf_insert_triedlist(&list, pd, KCF_KMFLAG(crq)) != NULL)
313 KCF_PROV_REFRELE(pd);
341 kcf_provider_desc_t *pd;
347 ((pd = kcf_ctx->kc_prov_desc) == NULL)) {
351 ASSERT(pd->pd_prov_type != CRYPTO_LOGICAL_PROVIDER);
354 if (CHECK_FASTPATH(cr, pd)) {
355 error = KCF_PROV_DIGEST_UPDATE(pd, ctx, data, NULL);
356 KCF_PROV_INCRSTATS(pd, error);
360 error = kcf_submit_request(pd, ctx, cr, &params, B_FALSE);
390 kcf_provider_desc_t *pd;
396 ((pd = kcf_ctx->kc_prov_desc) == NULL)) {
400 ASSERT(pd->pd_prov_type != CRYPTO_LOGICAL_PROVIDER);
403 if (CHECK_FASTPATH(cr, pd)) {
404 error = KCF_PROV_DIGEST_FINAL(pd, ctx, digest, NULL);
405 KCF_PROV_INCRSTATS(pd, error);
409 error = kcf_submit_request(pd, ctx, cr, &params, B_FALSE);
427 kcf_provider_desc_t *pd;
433 ((pd = kcf_ctx->kc_prov_desc) == NULL)) {
437 ASSERT(pd->pd_prov_type != CRYPTO_LOGICAL_PROVIDER);
440 if (CHECK_FASTPATH(cr, pd)) {
441 error = KCF_PROV_DIGEST_KEY(pd, ctx, key, NULL);
442 KCF_PROV_INCRSTATS(pd, error);
446 error = kcf_submit_request(pd, ctx, cr, &params, B_FALSE);
461 kcf_provider_desc_t *pd;
467 ((pd = kcf_ctx->kc_prov_desc) == NULL)) {
473 if (CHECK_FASTPATH(cr, pd)) {
474 error = KCF_PROV_DIGEST(pd, ctx, data, digest, NULL);
475 KCF_PROV_INCRSTATS(pd, error);
477 KCF_WRAP_DIGEST_OPS_PARAMS(&params, KCF_OP_SINGLE, pd->pd_sid,
479 error = kcf_submit_request(pd, ctx, cr, &params, B_FALSE);