Lines Matching refs:priTemplate

523 	CK_ATTRIBUTE_PTR priTemplate = NULL;
666 priTemplate = grow_template(pPrivateKeyTemplate,
668 if (priTemplate == NULL) {
674 priTemplate[n].type = CKA_CLASS;
675 priTemplate[n].pValue = (caddr_t)&pri_class;
676 priTemplate[n].ulValueLen = sizeof (pri_class);
680 priTemplate[n].type = CKA_KEY_TYPE;
682 priTemplate[n].pValue = (caddr_t)&key_type;
683 priTemplate[n].ulValueLen = sizeof (key_type);
686 priTemplate[n].type = CKA_MODULUS;
687 priTemplate[n].pValue = (caddr_t)private_modulus;
688 priTemplate[n].ulValueLen = modulus_bytes;
692 priTemplate[n].type = CKA_PRIVATE_EXPONENT;
693 priTemplate[n].pValue = (caddr_t)private_exponent;
694 priTemplate[n].ulValueLen = modulus_bytes;
698 priTemplate[n].type = CKA_PRIME_1;
699 priTemplate[n].pValue = (caddr_t)prime_1;
700 priTemplate[n].ulValueLen = modulus_bytes/2;
704 priTemplate[n].type = CKA_PRIME_2;
705 priTemplate[n].pValue = (caddr_t)prime_2;
706 priTemplate[n].ulValueLen = modulus_bytes/2;
710 priTemplate[n].type = CKA_EXPONENT_1;
711 priTemplate[n].pValue = (caddr_t)exponent_1;
712 priTemplate[n].ulValueLen = modulus_bytes/2;
716 priTemplate[n].type = CKA_EXPONENT_2;
717 priTemplate[n].pValue = (caddr_t)exponent_2;
718 priTemplate[n].ulValueLen = modulus_bytes/2;
722 priTemplate[n].type = CKA_COEFFICIENT;
723 priTemplate[n].pValue = (caddr_t)coefficient;
724 priTemplate[n].ulValueLen = modulus_bytes/2;
727 rv = process_object_attributes(priTemplate,
736 &priTemplate[pri_attr_count - pri_out_attr_count],
783 &priTemplate[pri_attr_count - pri_out_attr_count],
806 pub_attr_count, &priTemplate[pri_attr_count]);
811 rv = kernel_build_object(priTemplate, pri_attr_count + 1, new_pri_objp,
813 (void) free(priTemplate[pri_attr_count].pValue);
818 (void) free(priTemplate);
842 if (priTemplate != NULL) {
843 (void) free(priTemplate);
857 CK_ATTRIBUTE_PTR priTemplate = NULL;
978 priTemplate = grow_template(pPrivateKeyTemplate,
980 if (priTemplate == NULL) {
986 priTemplate[n].type = CKA_CLASS;
987 priTemplate[n].pValue = (caddr_t)&pri_class;
988 priTemplate[n].ulValueLen = sizeof (pri_class);
992 priTemplate[n].type = CKA_KEY_TYPE;
994 priTemplate[n].pValue = (caddr_t)&key_type;
995 priTemplate[n].ulValueLen = sizeof (key_type);
998 priTemplate[n].type = CKA_VALUE;
999 priTemplate[n].pValue = (caddr_t)private_value;
1000 priTemplate[n].ulValueLen = sizeof (private_value);
1003 rv = process_object_attributes(priTemplate,
1012 &priTemplate[pri_attr_count - pri_out_attr_count],
1059 &priTemplate[pri_attr_count - pri_out_attr_count],
1082 &priTemplate[pri_attr_count]);
1087 &priTemplate[pri_attr_count + 1]);
1089 (void) free(priTemplate[pri_attr_count].pValue);
1094 rv = kernel_build_object(priTemplate, pri_attr_count + 2,
1096 (void) free(priTemplate[pri_attr_count].pValue);
1097 (void) free(priTemplate[pri_attr_count + 1].pValue);
1102 (void) free(priTemplate);
1126 if (priTemplate != NULL) {
1127 (void) free(priTemplate);
1141 CK_ATTRIBUTE_PTR priTemplate = NULL;
1255 priTemplate = grow_template(pPrivateKeyTemplate,
1257 if (priTemplate == NULL) {
1263 priTemplate[n].type = CKA_CLASS;
1264 priTemplate[n].pValue = (caddr_t)&pri_class;
1265 priTemplate[n].ulValueLen = sizeof (pri_class);
1269 priTemplate[n].type = CKA_KEY_TYPE;
1271 priTemplate[n].pValue = (caddr_t)&key_type;
1272 priTemplate[n].ulValueLen = sizeof (key_type);
1275 priTemplate[n].type = CKA_VALUE;
1276 priTemplate[n].pValue = (caddr_t)value;
1277 priTemplate[n].ulValueLen = sizeof (value);
1280 rv = process_object_attributes(priTemplate,
1289 &priTemplate[pri_attr_count - pri_out_attr_count],
1336 &priTemplate[pri_attr_count - pri_out_attr_count],
1358 &priTemplate[pri_attr_count]);
1364 rv = kernel_build_object(priTemplate, pri_attr_count + 1,
1366 (void) free(priTemplate[pri_attr_count].pValue);
1371 (void) free(priTemplate);
1395 if (priTemplate != NULL) {
1396 (void) free(priTemplate);