Lines Matching refs:ctxp
447 ecc_ctx_t *ctxp = ctx->cc_provider_private;
449 if (ctxp != NULL) {
450 bzero(ctxp->key, ctxp->keychunk_size);
451 kmem_free(ctxp->key, ctxp->keychunk_size);
453 free_ecparams(&ctxp->ecparams, B_FALSE);
455 if (ctxp->mech_type == ECDSA_MECH_INFO_TYPE)
456 kmem_free(ctxp, sizeof (ecc_ctx_t));
458 kmem_free(ctxp, sizeof (digest_ecc_ctx_t));
472 ecc_ctx_t *ctxp;
504 ctxp = (ecc_ctx_t *)dctxp;
507 ctxp = kmem_zalloc(sizeof (ecc_ctx_t), kmflag);
511 if (ctxp == NULL) {
516 if ((rv = crypto_copy_key_to_ctx(key, &ctxp->key, &ctxp->keychunk_size,
523 kmem_free(ctxp, sizeof (ecc_ctx_t));
529 ctxp->mech_type = mech_type;
530 ctxp->ecparams = *ecparams;
539 ctx->cc_provider_private = ctxp;
594 ecc_digest_svrfy_common(digest_ecc_ctx_t *ctxp, crypto_data_t *data,
605 mech_type = ctxp->mech_type;
612 rv = crypto_digest_data(data, &(ctxp->sha1_ctx),
624 rv = ecc_sign_common((ecc_ctx_t *)ctxp, &der_cd, signature,
627 rv = ecc_verify_common((ecc_ctx_t *)ctxp, &der_cd, signature,
709 ecc_ctx_t *ctxp;
712 ctxp = ctx->cc_provider_private;
714 switch (ctxp->mech_type) {
716 rv = ecc_digest_svrfy_common((digest_ecc_ctx_t *)ctxp, data,
721 rv = ecc_sign_common(ctxp, data, signature, req);
736 digest_ecc_ctx_t *ctxp;
740 ctxp = ctx->cc_provider_private;
741 mech_type = ctxp->mech_type;
749 rv = crypto_digest_data(data, &(ctxp->sha1_ctx), NULL,
765 digest_ecc_ctx_t *ctxp;
768 ctxp = ctx->cc_provider_private;
770 rv = ecc_digest_svrfy_common(ctxp, NULL, signature, CRYPTO_DO_SIGN |
908 ecc_ctx_t *ctxp;
911 ctxp = ctx->cc_provider_private;
913 switch (ctxp->mech_type) {
915 rv = ecc_digest_svrfy_common((digest_ecc_ctx_t *)ctxp, data,
920 rv = ecc_verify_common(ctxp, data, signature, req);
934 digest_ecc_ctx_t *ctxp;
937 ctxp = ctx->cc_provider_private;
939 switch (ctxp->mech_type) {
941 rv = crypto_digest_data(data, &(ctxp->sha1_ctx), NULL,
961 digest_ecc_ctx_t *ctxp;
964 ctxp = ctx->cc_provider_private;
966 rv = ecc_digest_svrfy_common(ctxp, NULL, signature,