Lines Matching refs:priTemplate

518 	CK_ATTRIBUTE_PTR priTemplate = NULL;  in key_gen_rsa_by_value()  local
661 priTemplate = grow_template(pPrivateKeyTemplate, in key_gen_rsa_by_value()
663 if (priTemplate == NULL) { in key_gen_rsa_by_value()
669 priTemplate[n].type = CKA_CLASS; in key_gen_rsa_by_value()
670 priTemplate[n].pValue = (caddr_t)&pri_class; in key_gen_rsa_by_value()
671 priTemplate[n].ulValueLen = sizeof (pri_class); in key_gen_rsa_by_value()
675 priTemplate[n].type = CKA_KEY_TYPE; in key_gen_rsa_by_value()
677 priTemplate[n].pValue = (caddr_t)&key_type; in key_gen_rsa_by_value()
678 priTemplate[n].ulValueLen = sizeof (key_type); in key_gen_rsa_by_value()
681 priTemplate[n].type = CKA_MODULUS; in key_gen_rsa_by_value()
682 priTemplate[n].pValue = (caddr_t)private_modulus; in key_gen_rsa_by_value()
683 priTemplate[n].ulValueLen = modulus_bytes; in key_gen_rsa_by_value()
687 priTemplate[n].type = CKA_PRIVATE_EXPONENT; in key_gen_rsa_by_value()
688 priTemplate[n].pValue = (caddr_t)private_exponent; in key_gen_rsa_by_value()
689 priTemplate[n].ulValueLen = modulus_bytes; in key_gen_rsa_by_value()
693 priTemplate[n].type = CKA_PRIME_1; in key_gen_rsa_by_value()
694 priTemplate[n].pValue = (caddr_t)prime_1; in key_gen_rsa_by_value()
695 priTemplate[n].ulValueLen = modulus_bytes/2; in key_gen_rsa_by_value()
699 priTemplate[n].type = CKA_PRIME_2; in key_gen_rsa_by_value()
700 priTemplate[n].pValue = (caddr_t)prime_2; in key_gen_rsa_by_value()
701 priTemplate[n].ulValueLen = modulus_bytes/2; in key_gen_rsa_by_value()
705 priTemplate[n].type = CKA_EXPONENT_1; in key_gen_rsa_by_value()
706 priTemplate[n].pValue = (caddr_t)exponent_1; in key_gen_rsa_by_value()
707 priTemplate[n].ulValueLen = modulus_bytes/2; in key_gen_rsa_by_value()
711 priTemplate[n].type = CKA_EXPONENT_2; in key_gen_rsa_by_value()
712 priTemplate[n].pValue = (caddr_t)exponent_2; in key_gen_rsa_by_value()
713 priTemplate[n].ulValueLen = modulus_bytes/2; in key_gen_rsa_by_value()
717 priTemplate[n].type = CKA_COEFFICIENT; in key_gen_rsa_by_value()
718 priTemplate[n].pValue = (caddr_t)coefficient; in key_gen_rsa_by_value()
719 priTemplate[n].ulValueLen = modulus_bytes/2; in key_gen_rsa_by_value()
722 rv = process_object_attributes(priTemplate, in key_gen_rsa_by_value()
731 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_rsa_by_value()
778 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_rsa_by_value()
801 pub_attr_count, &priTemplate[pri_attr_count]); in key_gen_rsa_by_value()
806 rv = kernel_build_object(priTemplate, pri_attr_count + 1, new_pri_objp, in key_gen_rsa_by_value()
808 (void) free(priTemplate[pri_attr_count].pValue); in key_gen_rsa_by_value()
813 (void) free(priTemplate); in key_gen_rsa_by_value()
837 if (priTemplate != NULL) { in key_gen_rsa_by_value()
838 (void) free(priTemplate); in key_gen_rsa_by_value()
852 CK_ATTRIBUTE_PTR priTemplate = NULL; in key_gen_dh_by_value() local
973 priTemplate = grow_template(pPrivateKeyTemplate, in key_gen_dh_by_value()
975 if (priTemplate == NULL) { in key_gen_dh_by_value()
981 priTemplate[n].type = CKA_CLASS; in key_gen_dh_by_value()
982 priTemplate[n].pValue = (caddr_t)&pri_class; in key_gen_dh_by_value()
983 priTemplate[n].ulValueLen = sizeof (pri_class); in key_gen_dh_by_value()
987 priTemplate[n].type = CKA_KEY_TYPE; in key_gen_dh_by_value()
989 priTemplate[n].pValue = (caddr_t)&key_type; in key_gen_dh_by_value()
990 priTemplate[n].ulValueLen = sizeof (key_type); in key_gen_dh_by_value()
993 priTemplate[n].type = CKA_VALUE; in key_gen_dh_by_value()
994 priTemplate[n].pValue = (caddr_t)private_value; in key_gen_dh_by_value()
995 priTemplate[n].ulValueLen = sizeof (private_value); in key_gen_dh_by_value()
998 rv = process_object_attributes(priTemplate, in key_gen_dh_by_value()
1007 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_dh_by_value()
1054 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_dh_by_value()
1077 &priTemplate[pri_attr_count]); in key_gen_dh_by_value()
1082 &priTemplate[pri_attr_count + 1]); in key_gen_dh_by_value()
1084 (void) free(priTemplate[pri_attr_count].pValue); in key_gen_dh_by_value()
1089 rv = kernel_build_object(priTemplate, pri_attr_count + 2, in key_gen_dh_by_value()
1091 (void) free(priTemplate[pri_attr_count].pValue); in key_gen_dh_by_value()
1092 (void) free(priTemplate[pri_attr_count + 1].pValue); in key_gen_dh_by_value()
1097 (void) free(priTemplate); in key_gen_dh_by_value()
1121 if (priTemplate != NULL) { in key_gen_dh_by_value()
1122 (void) free(priTemplate); in key_gen_dh_by_value()
1136 CK_ATTRIBUTE_PTR priTemplate = NULL; in key_gen_ec_by_value() local
1250 priTemplate = grow_template(pPrivateKeyTemplate, in key_gen_ec_by_value()
1252 if (priTemplate == NULL) { in key_gen_ec_by_value()
1258 priTemplate[n].type = CKA_CLASS; in key_gen_ec_by_value()
1259 priTemplate[n].pValue = (caddr_t)&pri_class; in key_gen_ec_by_value()
1260 priTemplate[n].ulValueLen = sizeof (pri_class); in key_gen_ec_by_value()
1264 priTemplate[n].type = CKA_KEY_TYPE; in key_gen_ec_by_value()
1266 priTemplate[n].pValue = (caddr_t)&key_type; in key_gen_ec_by_value()
1267 priTemplate[n].ulValueLen = sizeof (key_type); in key_gen_ec_by_value()
1270 priTemplate[n].type = CKA_VALUE; in key_gen_ec_by_value()
1271 priTemplate[n].pValue = (caddr_t)value; in key_gen_ec_by_value()
1272 priTemplate[n].ulValueLen = sizeof (value); in key_gen_ec_by_value()
1275 rv = process_object_attributes(priTemplate, in key_gen_ec_by_value()
1284 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_ec_by_value()
1331 &priTemplate[pri_attr_count - pri_out_attr_count], in key_gen_ec_by_value()
1353 &priTemplate[pri_attr_count]); in key_gen_ec_by_value()
1359 rv = kernel_build_object(priTemplate, pri_attr_count + 1, in key_gen_ec_by_value()
1361 (void) free(priTemplate[pri_attr_count].pValue); in key_gen_ec_by_value()
1366 (void) free(priTemplate); in key_gen_ec_by_value()
1390 if (priTemplate != NULL) { in key_gen_ec_by_value()
1391 (void) free(priTemplate); in key_gen_ec_by_value()