Lines Matching defs:attr

153 	CK_ATTRIBUTE *attr;
179 for (attr = pk11_attribute_first(gost);
180 attr != NULL;
181 attr = pk11_attribute_next(gost, attr))
182 switch (attr->type) {
186 attr->ulValueLen);
189 memmove(keyTemplate[6].pValue, attr->pValue,
190 attr->ulValueLen);
191 keyTemplate[6].ulValueLen = attr->ulValueLen;
258 CK_ATTRIBUTE *attr;
284 for (attr = pk11_attribute_first(gost);
285 attr != NULL;
286 attr = pk11_attribute_next(gost, attr))
287 switch (attr->type) {
289 INSIST(keyTemplate[5].type == attr->type);
291 attr->ulValueLen);
294 memmove(keyTemplate[5].pValue, attr->pValue,
295 attr->ulValueLen);
296 keyTemplate[5].ulValueLen = attr->ulValueLen;
499 CK_ATTRIBUTE *attr;
530 sizeof(*attr) * 2);
533 memset(gost->repr, 0, sizeof(*attr) * 2);
536 attr = gost->repr;
537 attr[0].type = CKA_VALUE;
538 attr[1].type = CKA_VALUE2;
540 attr = gost->repr;
542 (pk11_ctx->session, pub, attr, 1),
544 attr->pValue = isc_mem_get(key->mctx, attr->ulValueLen);
545 if (attr->pValue == NULL)
547 memset(attr->pValue, 0, attr->ulValueLen);
549 (pk11_ctx->session, pub, attr, 1),
552 attr++;
553 attr->type = CKA_VALUE;
555 (pk11_ctx->session, priv, attr, 1),
557 attr->pValue = isc_mem_get(key->mctx, attr->ulValueLen);
558 if (attr->pValue == NULL)
560 memset(attr->pValue, 0, attr->ulValueLen);
562 (pk11_ctx->session, priv, attr, 1),
564 attr->type = CKA_VALUE2;
590 CK_ATTRIBUTE *attr;
594 attr = pk11_attribute_bytype(gost, CKA_VALUE2);
595 return (ISC_TF((attr != NULL) || gost->ontoken));
601 CK_ATTRIBUTE *attr;
608 for (attr = pk11_attribute_first(gost);
609 attr != NULL;
610 attr = pk11_attribute_next(gost, attr))
611 switch (attr->type) {
614 if (attr->pValue != NULL) {
615 isc_safe_memwipe(attr->pValue,
616 attr->ulValueLen);
618 attr->pValue,
619 attr->ulValueLen);
624 isc_safe_memwipe(gost->repr, gost->attrcnt * sizeof(*attr));
626 gost->repr, gost->attrcnt * sizeof(*attr));
637 CK_ATTRIBUTE *attr;
642 attr = pk11_attribute_bytype(gost, CKA_VALUE);
643 if ((attr == NULL) || (attr->ulValueLen != ISC_GOST_PUBKEYLENGTH))
649 memmove(r.base, (CK_BYTE_PTR) attr->pValue, ISC_GOST_PUBKEYLENGTH);
659 CK_ATTRIBUTE *attr;
671 gost->repr = (CK_ATTRIBUTE *) isc_mem_get(key->mctx, sizeof(*attr));
676 attr = gost->repr;
677 attr->type = CKA_VALUE;
678 attr->pValue = isc_mem_get(key->mctx, ISC_GOST_PUBKEYLENGTH);
679 if (attr->pValue == NULL)
681 memmove((CK_BYTE_PTR) attr->pValue, r.base, ISC_GOST_PUBKEYLENGTH);
682 attr->ulValueLen = ISC_GOST_PUBKEYLENGTH;
690 for (attr = pk11_attribute_first(gost);
691 attr != NULL;
692 attr = pk11_attribute_next(gost, attr))
693 switch (attr->type) {
695 if (attr->pValue != NULL) {
696 isc_safe_memwipe(attr->pValue,
697 attr->ulValueLen);
699 attr->pValue,
700 attr->ulValueLen);
705 isc_safe_memwipe(gost->repr, gost->attrcnt * sizeof(*attr));
707 gost->repr, gost->attrcnt * sizeof(*attr));
731 CK_ATTRIBUTE *attr;
743 attr = pk11_attribute_bytype(gost, CKA_VALUE2);
744 if (attr != NULL) {
745 buf = isc_mem_get(key->mctx, attr->ulValueLen + 39);
750 (unsigned short) attr->ulValueLen + 39;
752 memmove(buf + 39, attr->pValue, attr->ulValueLen);
753 adj = (int) attr->ulValueLen - 32;
768 isc_safe_memwipe(buf, attr->ulValueLen);
769 isc_mem_put(key->mctx, buf, attr->ulValueLen);
783 CK_ATTRIBUTE *attr;
794 attr = pk11_attribute_bytype(gost, CKA_VALUE2);
795 if (attr != NULL) {
796 buf = isc_mem_get(key->mctx, attr->ulValueLen);
800 priv.elements[i].length = (unsigned short) attr->ulValueLen;
801 memmove(buf, attr->pValue, attr->ulValueLen);
811 isc_safe_memwipe(buf, attr->ulValueLen);
812 isc_mem_put(key->mctx, buf, attr->ulValueLen);
823 CK_ATTRIBUTE *attr, *pattr;
877 sizeof(*attr) * 2);
880 memset(gost->repr, 0, sizeof(*attr) * 2);
883 attr = gost->repr;
884 attr->type = CKA_VALUE;
887 attr->pValue = isc_mem_get(key->mctx, pattr->ulValueLen);
888 if (attr->pValue == NULL)
890 memmove(attr->pValue, pattr->pValue, pattr->ulValueLen);
891 attr->ulValueLen = pattr->ulValueLen;
893 attr++;
894 attr->type = CKA_VALUE2;
895 attr->pValue = isc_mem_get(key->mctx, priv.elements[0].length);
896 if (attr->pValue == NULL)
898 memmove(attr->pValue, priv.elements[0].data, priv.elements[0].length);
899 attr->ulValueLen = priv.elements[0].length;