Lines Matching defs:ec
144 pk11_object_t *ec = key->keydata.pkey;
152 REQUIRE(ec != NULL);
164 if (ec->ontoken && (dctx->use == DO_SIGN))
165 slotid = ec->slot;
169 ec->reqlogon, NULL, slotid);
177 if (ec->ontoken && (ec->object != CK_INVALID_HANDLE)) {
178 pk11_ctx->ontoken = ec->ontoken;
179 pk11_ctx->object = ec->object;
183 for (attr = pk11_attribute_first(ec);
185 attr = pk11_attribute_next(ec, attr))
276 pk11_object_t *ec = key->keydata.pkey;
283 REQUIRE(ec != NULL);
290 if (ec->ontoken && (dctx->use == DO_SIGN))
291 slotid = ec->slot;
295 ec->reqlogon, NULL, slotid);
299 for (attr = pk11_attribute_first(ec);
301 attr = pk11_attribute_next(ec, attr))
471 pk11_object_t *ec;
489 ec = (pk11_object_t *) isc_mem_get(key->mctx, sizeof(*ec));
490 if (ec == NULL)
492 memset(ec, 0, sizeof(*ec));
493 key->keydata.pkey = ec;
494 ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 3);
495 if (ec->repr == NULL)
497 memset(ec->repr, 0, sizeof(*attr) * 3);
498 ec->attrcnt = 3;
500 attr = ec->repr;
518 attr = ec->repr;
574 pk11_object_t *ec = key->keydata.pkey;
577 if (ec == NULL)
579 attr = pk11_attribute_bytype(ec, CKA_VALUE);
580 return (ISC_TF((attr != NULL) || ec->ontoken));
585 pk11_object_t *ec = key->keydata.pkey;
588 if (ec == NULL)
591 INSIST((ec->object == CK_INVALID_HANDLE) || ec->ontoken);
593 for (attr = pk11_attribute_first(ec);
595 attr = pk11_attribute_next(ec, attr))
605 if (ec->repr != NULL) {
606 memset(ec->repr, 0, ec->attrcnt * sizeof(*attr));
608 ec->repr,
609 ec->attrcnt * sizeof(*attr));
611 memset(ec, 0, sizeof(*ec));
612 isc_mem_put(key->mctx, ec, sizeof(*ec));
618 pk11_object_t *ec;
630 ec = key->keydata.pkey;
631 attr = pk11_attribute_bytype(ec, CKA_EC_POINT);
646 pk11_object_t *ec;
665 ec = (pk11_object_t *) isc_mem_get(key->mctx, sizeof(*ec));
666 if (ec == NULL)
668 memset(ec, 0, sizeof(*ec));
669 ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
670 if (ec->repr == NULL)
672 ec->attrcnt = 2;
674 attr = ec->repr;
703 key->keydata.pkey = ec;
708 for (attr = pk11_attribute_first(ec);
710 attr = pk11_attribute_next(ec, attr))
717 if (ec->repr != NULL) {
718 memset(ec->repr, 0, ec->attrcnt * sizeof(*attr));
720 ec->repr,
721 ec->attrcnt * sizeof(*attr));
723 memset(ec, 0, sizeof(*ec));
724 isc_mem_put(key->mctx, ec, sizeof(*ec));
731 pk11_object_t *ec;
745 ec = key->keydata.pkey;
746 attr = pk11_attribute_bytype(ec, CKA_VALUE);
799 pk11_object_t *ec;
807 ec = key->keydata.pkey;
810 ec->object = CK_INVALID_HANDLE;
811 ec->ontoken = ISC_TRUE;
812 ec->reqlogon = ISC_TRUE;
813 ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
814 if (ec->repr == NULL)
816 memset(ec->repr, 0, sizeof(*attr) * 2);
817 ec->attrcnt = 2;
818 attr = ec->repr;
837 ret = pk11_parse_uri(ec, label, key->mctx, OP_EC);
846 ec->reqlogon, NULL, ec->slot);
850 attr = pk11_attribute_bytype(ec, CKA_LABEL);
852 attr = pk11_attribute_bytype(ec, CKA_ID);
863 (pk11_ctx->session, &ec->object, (CK_ULONG) 1, &cnt),
899 pk11_object_t *ec = NULL;
942 ec = (pk11_object_t *) isc_mem_get(key->mctx, sizeof(*ec));
943 if (ec == NULL)
945 memset(ec, 0, sizeof(*ec));
946 key->keydata.pkey = ec;
958 ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 3);
959 if (ec->repr == NULL)
961 memset(ec->repr, 0, sizeof(*attr) * 3);
962 ec->attrcnt = 3;
964 attr = ec->repr;
1025 pk11_object_t *ec;
1032 ec = (pk11_object_t *) isc_mem_get(key->mctx, sizeof(*ec));
1033 if (ec == NULL)
1035 memset(ec, 0, sizeof(*ec));
1036 ec->object = CK_INVALID_HANDLE;
1037 ec->ontoken = ISC_TRUE;
1038 ec->reqlogon = ISC_TRUE;
1039 key->keydata.pkey = ec;
1041 ec->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr) * 2);
1042 if (ec->repr == NULL)
1044 memset(ec->repr, 0, sizeof(*attr) * 2);
1045 ec->attrcnt = 2;
1046 attr = ec->repr;
1050 ret = pk11_parse_uri(ec, label, key->mctx, OP_EC);
1059 ec->reqlogon, NULL, ec->slot);
1063 attr = pk11_attribute_bytype(ec, CKA_LABEL);
1065 attr = pk11_attribute_bytype(ec, CKA_ID);
1084 attr = ec->repr;
1104 (pk11_ctx->session, &ec->object, (CK_ULONG) 1, &cnt),