Lines Matching refs:pd

47 #define	KCF_PROV_NULL_ENTRY_POINT(pd, o1, o2, ops)			\  argument
48 (ops = (caddr_t *)(void *)((caddr_t)(pd)->pd_ops_vector + (o1)), \
73 kcf_insert_triedlist(kcf_prov_tried_t **list, kcf_provider_desc_t *pd, in kcf_insert_triedlist() argument
84 KCF_PROV_REFHOLD(pd); in kcf_insert_triedlist()
85 l->pt_pd = pd; in kcf_insert_triedlist()
93 is_in_triedlist(kcf_provider_desc_t *pd, kcf_prov_tried_t *triedl) in is_in_triedlist() argument
96 if (triedl->pt_pd == pd) in is_in_triedlist()
188 is_valid_provider_for_mech(kcf_provider_desc_t *pd, kcf_mech_entry_t *me, in is_valid_provider_for_mech() argument
197 if (prov_chain->pm_prov_desc == pd && in is_valid_provider_for_mech()
483 kcf_provider_desc_t *prev, kcf_provider_desc_t **pd) in kcf_get_next_logical_provider_member() argument
510 *pd = next; in kcf_get_next_logical_provider_member()
533 kcf_provider_desc_t *pd = NULL, *gpd = NULL; in kcf_get_mech_provider() local
584 pd = prov_chain->pm_prov_desc; in kcf_get_mech_provider()
587 !KCF_IS_PROV_USABLE(pd) || in kcf_get_mech_provider()
588 IS_PROVIDER_TRIED(pd, triedl)) { in kcf_get_mech_provider()
593 if ((key != NULL) && !kcf_check_prov_mech_keylen(pd, in kcf_get_mech_provider()
603 gpd = pd; in kcf_get_mech_provider()
605 len = KCF_PROV_LOAD(pd); in kcf_get_mech_provider()
608 gpd = pd; in kcf_get_mech_provider()
613 pd = gpd; in kcf_get_mech_provider()
617 if (pd == NULL && (mdesc = me->me_sw_prov) != NULL) { in kcf_get_mech_provider()
618 pd = mdesc->pm_prov_desc; in kcf_get_mech_provider()
620 !KCF_IS_PROV_USABLE(pd) || in kcf_get_mech_provider()
621 IS_PROVIDER_TRIED(pd, triedl)) in kcf_get_mech_provider()
622 pd = NULL; in kcf_get_mech_provider()
626 if (pd == NULL) { in kcf_get_mech_provider()
636 KCF_PROV_REFHOLD(pd); in kcf_get_mech_provider()
640 return (pd); in kcf_get_mech_provider()
665 kcf_provider_desc_t *pd = NULL, *pdm1 = NULL, *pdm1m2 = NULL; in kcf_get_dual_provider() local
709 pd = prov_chain->pm_prov_desc; in kcf_get_dual_provider()
712 !KCF_IS_PROV_USABLE(pd) || in kcf_get_dual_provider()
713 IS_PROVIDER_TRIED(pd, triedl)) { in kcf_get_dual_provider()
718 if ((key1 != NULL) && !kcf_check_prov_mech_keylen(pd, in kcf_get_dual_provider()
730 pdm1 = pd; in kcf_get_dual_provider()
732 len = KCF_PROV_LOAD(pd); in kcf_get_dual_provider()
738 pdm1 = pd; in kcf_get_dual_provider()
750 !kcf_check_prov_mech_keylen(pd, in kcf_get_dual_provider()
763 pdm1m2 = pd; in kcf_get_dual_provider()
768 pdm1m2 = pd; in kcf_get_dual_provider()
780 pd = (pdm1m2 != NULL) ? pdm1m2 : pdm1; in kcf_get_dual_provider()
784 if (pd == NULL && (mdesc = me->me_sw_prov) != NULL) { in kcf_get_dual_provider()
785 pd = mdesc->pm_prov_desc; in kcf_get_dual_provider()
787 !KCF_IS_PROV_USABLE(pd) || in kcf_get_dual_provider()
788 IS_PROVIDER_TRIED(pd, triedl)) in kcf_get_dual_provider()
789 pd = NULL; in kcf_get_dual_provider()
810 if (pd == NULL) { in kcf_get_dual_provider()
820 KCF_PROV_REFHOLD(pd); in kcf_get_dual_provider()
823 return (pd); in kcf_get_dual_provider()
837 common_submit_request(kcf_provider_desc_t *pd, crypto_ctx_t *ctx, in common_submit_request() argument
857 pd, &dops->do_mech); in common_submit_request()
859 err = KCF_PROV_DIGEST_INIT(pd, ctx, &dops->do_mech, in common_submit_request()
864 err = KCF_PROV_DIGEST(pd, ctx, dops->do_data, in common_submit_request()
869 err = KCF_PROV_DIGEST_UPDATE(pd, ctx, in common_submit_request()
874 err = KCF_PROV_DIGEST_FINAL(pd, ctx, in common_submit_request()
881 pd, &dops->do_mech); in common_submit_request()
882 err = KCF_PROV_DIGEST_ATOMIC(pd, dops->do_sid, in common_submit_request()
888 err = KCF_PROV_DIGEST_KEY(pd, ctx, dops->do_digest_key, in common_submit_request()
904 pd, &mops->mo_mech); in common_submit_request()
906 err = KCF_PROV_MAC_INIT(pd, ctx, &mops->mo_mech, in common_submit_request()
911 err = KCF_PROV_MAC(pd, ctx, mops->mo_data, in common_submit_request()
916 err = KCF_PROV_MAC_UPDATE(pd, ctx, mops->mo_data, in common_submit_request()
921 err = KCF_PROV_MAC_FINAL(pd, ctx, mops->mo_mac, rhndl); in common_submit_request()
927 pd, &mops->mo_mech); in common_submit_request()
929 err = KCF_PROV_MAC_ATOMIC(pd, mops->mo_sid, in common_submit_request()
937 pd, &mops->mo_mech); in common_submit_request()
939 err = KCF_PROV_MAC_VERIFY_ATOMIC(pd, mops->mo_sid, in common_submit_request()
956 pd, &eops->eo_mech); in common_submit_request()
958 err = KCF_PROV_ENCRYPT_INIT(pd, ctx, &eops->eo_mech, in common_submit_request()
963 err = KCF_PROV_ENCRYPT(pd, ctx, eops->eo_plaintext, in common_submit_request()
968 err = KCF_PROV_ENCRYPT_UPDATE(pd, ctx, in common_submit_request()
973 err = KCF_PROV_ENCRYPT_FINAL(pd, ctx, in common_submit_request()
980 pd, &eops->eo_mech); in common_submit_request()
982 err = KCF_PROV_ENCRYPT_ATOMIC(pd, eops->eo_sid, in common_submit_request()
999 pd, &dcrops->dop_mech); in common_submit_request()
1001 err = KCF_PROV_DECRYPT_INIT(pd, ctx, &dcrops->dop_mech, in common_submit_request()
1006 err = KCF_PROV_DECRYPT(pd, ctx, dcrops->dop_ciphertext, in common_submit_request()
1011 err = KCF_PROV_DECRYPT_UPDATE(pd, ctx, in common_submit_request()
1017 err = KCF_PROV_DECRYPT_FINAL(pd, ctx, in common_submit_request()
1024 pd, &dcrops->dop_mech); in common_submit_request()
1026 err = KCF_PROV_DECRYPT_ATOMIC(pd, dcrops->dop_sid, in common_submit_request()
1044 pd, &sops->so_mech); in common_submit_request()
1046 err = KCF_PROV_SIGN_INIT(pd, ctx, &sops->so_mech, in common_submit_request()
1052 pd, &sops->so_mech); in common_submit_request()
1054 err = KCF_PROV_SIGN_RECOVER_INIT(pd, ctx, in common_submit_request()
1060 err = KCF_PROV_SIGN(pd, ctx, sops->so_data, in common_submit_request()
1065 err = KCF_PROV_SIGN_RECOVER(pd, ctx, in common_submit_request()
1070 err = KCF_PROV_SIGN_UPDATE(pd, ctx, sops->so_data, in common_submit_request()
1075 err = KCF_PROV_SIGN_FINAL(pd, ctx, sops->so_signature, in common_submit_request()
1082 pd, &sops->so_mech); in common_submit_request()
1084 err = KCF_PROV_SIGN_ATOMIC(pd, sops->so_sid, in common_submit_request()
1092 pd, &sops->so_mech); in common_submit_request()
1094 err = KCF_PROV_SIGN_RECOVER_ATOMIC(pd, sops->so_sid, in common_submit_request()
1111 pd, &vops->vo_mech); in common_submit_request()
1113 err = KCF_PROV_VERIFY_INIT(pd, ctx, &vops->vo_mech, in common_submit_request()
1119 pd, &vops->vo_mech); in common_submit_request()
1121 err = KCF_PROV_VERIFY_RECOVER_INIT(pd, ctx, in common_submit_request()
1127 err = KCF_PROV_VERIFY(pd, ctx, vops->vo_data, in common_submit_request()
1132 err = KCF_PROV_VERIFY_RECOVER(pd, ctx, in common_submit_request()
1137 err = KCF_PROV_VERIFY_UPDATE(pd, ctx, vops->vo_data, in common_submit_request()
1142 err = KCF_PROV_VERIFY_FINAL(pd, ctx, vops->vo_signature, in common_submit_request()
1149 pd, &vops->vo_mech); in common_submit_request()
1151 err = KCF_PROV_VERIFY_ATOMIC(pd, vops->vo_sid, in common_submit_request()
1159 pd, &vops->vo_mech); in common_submit_request()
1161 err = KCF_PROV_VERIFY_RECOVER_ATOMIC(pd, vops->vo_sid, in common_submit_request()
1183 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1188 pd, &eops->em_encr_mech); in common_submit_request()
1192 pd, &eops->em_mac_mech); in common_submit_request()
1194 err = KCF_PROV_ENCRYPT_MAC_INIT(pd, ctx, in common_submit_request()
1203 err = KCF_PROV_ENCRYPT_MAC(pd, ctx, in common_submit_request()
1212 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1215 err = KCF_PROV_ENCRYPT_MAC_UPDATE(pd, ctx, in common_submit_request()
1223 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1226 err = KCF_PROV_ENCRYPT_MAC_FINAL(pd, ctx, in common_submit_request()
1235 pd, &eops->em_encr_mech); in common_submit_request()
1239 pd, &eops->em_mac_mech); in common_submit_request()
1241 err = KCF_PROV_ENCRYPT_MAC_ATOMIC(pd, eops->em_sid, in common_submit_request()
1268 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1273 pd, &dops->md_mac_mech); in common_submit_request()
1277 pd, &dops->md_decr_mech); in common_submit_request()
1279 err = KCF_PROV_MAC_DECRYPT_INIT(pd, ctx, in common_submit_request()
1288 err = KCF_PROV_MAC_DECRYPT(pd, ctx, in common_submit_request()
1297 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1300 err = KCF_PROV_MAC_DECRYPT_UPDATE(pd, ctx, in common_submit_request()
1308 err = kcf_emulate_dual(pd, ctx, params); in common_submit_request()
1311 err = KCF_PROV_MAC_DECRYPT_FINAL(pd, ctx, in common_submit_request()
1320 pd, &dops->md_mac_mech); in common_submit_request()
1324 pd, &dops->md_decr_mech); in common_submit_request()
1326 err = KCF_PROV_MAC_DECRYPT_ATOMIC(pd, dops->md_sid, in common_submit_request()
1341 pd, &dops->md_mac_mech); in common_submit_request()
1345 pd, &dops->md_decr_mech); in common_submit_request()
1347 err = KCF_PROV_MAC_VERIFY_DECRYPT_ATOMIC(pd, in common_submit_request()
1367 KCF_SET_PROVIDER_MECHNUM(kops->ko_framework_mechtype, pd, in common_submit_request()
1372 err = KCF_PROV_KEY_GENERATE(pd, kops->ko_sid, in common_submit_request()
1379 err = KCF_PROV_KEY_GENERATE_PAIR(pd, kops->ko_sid, in common_submit_request()
1389 err = KCF_PROV_KEY_WRAP(pd, kops->ko_sid, in common_submit_request()
1397 err = KCF_PROV_KEY_UNWRAP(pd, kops->ko_sid, in common_submit_request()
1406 err = KCF_PROV_KEY_DERIVE(pd, kops->ko_sid, in common_submit_request()
1427 err = KCF_PROV_SEED_RANDOM(pd, rops->rn_sid, in common_submit_request()
1433 err = KCF_PROV_GENERATE_RANDOM(pd, rops->rn_sid, in common_submit_request()
1457 err = KCF_PROV_SESSION_OPEN(pd, sops->so_sid_ptr, in common_submit_request()
1470 err = KCF_PROV_SESSION_CLOSE(pd, sops->so_sid, in common_submit_request()
1475 err = KCF_PROV_SESSION_LOGIN(pd, sops->so_sid, in common_submit_request()
1481 err = KCF_PROV_SESSION_LOGOUT(pd, sops->so_sid, rhndl); in common_submit_request()
1496 err = KCF_PROV_OBJECT_CREATE(pd, jops->oo_sid, in common_submit_request()
1502 err = KCF_PROV_OBJECT_COPY(pd, jops->oo_sid, in common_submit_request()
1509 err = KCF_PROV_OBJECT_DESTROY(pd, jops->oo_sid, in common_submit_request()
1514 err = KCF_PROV_OBJECT_GET_SIZE(pd, jops->oo_sid, in common_submit_request()
1519 err = KCF_PROV_OBJECT_GET_ATTRIBUTE_VALUE(pd, in common_submit_request()
1525 err = KCF_PROV_OBJECT_SET_ATTRIBUTE_VALUE(pd, in common_submit_request()
1531 err = KCF_PROV_OBJECT_FIND_INIT(pd, jops->oo_sid, in common_submit_request()
1537 err = KCF_PROV_OBJECT_FIND(pd, jops->oo_find_pp, in common_submit_request()
1543 err = KCF_PROV_OBJECT_FIND_FINAL(pd, jops->oo_find_pp, in common_submit_request()
1567 err = KCF_PROV_EXT_INFO(pd, pops->po_ext_info, rhndl, in common_submit_request()
1572 err = KCF_PROV_INIT_TOKEN(pd, pops->po_pin, in common_submit_request()
1577 err = KCF_PROV_INIT_PIN(pd, pops->po_sid, pops->po_pin, in common_submit_request()
1582 err = KCF_PROV_SET_PIN(pd, pops->po_sid, in common_submit_request()
1597 KCF_SET_PROVIDER_MECHNUM(kops->ko_framework_mechtype, pd, in common_submit_request()
1602 err = KCF_PROV_NOSTORE_KEY_GENERATE(pd, kops->ko_sid, in common_submit_request()
1610 err = KCF_PROV_NOSTORE_KEY_GENERATE_PAIR(pd, in common_submit_request()
1623 err = KCF_PROV_NOSTORE_KEY_DERIVE(pd, kops->ko_sid, in common_submit_request()
1640 KCF_PROV_INCRSTATS(pd, err); in common_submit_request()
1657 kcf_emulate_dual(kcf_provider_desc_t *pd, crypto_ctx_t *ctx, in kcf_emulate_dual() argument
1682 pd->pd_sid, &cmops->em_encr_mech, in kcf_emulate_dual()
1686 err = kcf_submit_request(pd, ctx, NULL, &encr_params, in kcf_emulate_dual()
1715 pd->pd_sid, NULL, NULL, pt, (crypto_data_t *)ct, in kcf_emulate_dual()
1718 err = kcf_submit_request(pd, ctx, NULL, &encr_params, in kcf_emulate_dual()
1757 pd->pd_sid, NULL, NULL, NULL, (crypto_data_t *)ct, in kcf_emulate_dual()
1760 err = kcf_submit_request(pd, ctx, NULL, &encr_params, in kcf_emulate_dual()
1795 KCF_PROV_INCRSTATS(pd, err); in kcf_emulate_dual()
1821 pd->pd_sid, &mdops->md_decr_mech, in kcf_emulate_dual()
1825 err = kcf_submit_request(pd, ctx, NULL, &decr_params, in kcf_emulate_dual()