Lines Matching refs:result

499 	TSS_RESULT result;
502 result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_KEY_BLOB,
504 if (result != TSS_SUCCESS) {
506 result, Trspi_Error_String(result));
507 return (result);
511 result = Trspi_UnloadBlob_PUBKEY(&offset, blob, &pub_key);
512 if (result != TSS_SUCCESS) {
514 result, Trspi_Error_String(result));
515 return (result);
531 result = Tspi_SetAttribData(hKey, TSS_TSPATTRIB_KEY_BLOB,
533 if (result != TSS_SUCCESS) {
535 result, Trspi_Error_String(result));
536 return (result);
539 return (result);
548 TSS_RESULT result;
554 if ((result = Tspi_Context_GetTpmObject(hContext, &hTPM))) {
556 result, Trspi_Error_String(result));
559 if ((result = Tspi_TPM_GetCapability(hTPM,
563 result, Trspi_Error_String(result));
631 TSS_RESULT result;
633 if ((result = Tspi_Context_Create(pContext))) {
635 result, Trspi_Error_String(result));
639 if ((result = Tspi_Context_Connect(*pContext, NULL))) {
641 result, Trspi_Error_String(result));
646 return (result);
654 TSS_RESULT result;
656 result = open_tss_context(hContext);
657 if (result)
660 if ((result = Tspi_Context_GetDefaultPolicy(*hContext,
663 result, Trspi_Error_String(result));
672 result = token_get_tpm_info(*hContext, nv_token_data);
673 return (result);
692 TSS_RESULT result;
701 result = Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_RSAKEY,
703 if (result != TSS_SUCCESS) {
705 result, Trspi_Error_String(result));
709 result = set_public_modulus(hContext, *phKey, size_n, n);
710 if (result != TSS_SUCCESS) {
717 result = Tspi_SetAttribData(*phKey, TSS_TSPATTRIB_KEY_BLOB,
719 if (result != TSS_SUCCESS) {
721 result, Trspi_Error_String(result));
727 result = tss_assign_secret_key_policy(hContext, TSS_POLICY_MIGRATION,
731 if ((result = Tspi_SetAttribUint32(*phKey,
735 result, Trspi_Error_String(result));
740 if ((result = Tspi_SetAttribUint32(*phKey,
744 result, Trspi_Error_String(result));
750 result = Tspi_Key_WrapKey(*phKey, hParentKey, NULL_HPCRS);
751 if (result != TSS_SUCCESS) {
753 result, Trspi_Error_String(result));
776 TSS_RESULT result;
870 if ((result = Tspi_Context_CreateObject(hContext,
873 result, Trspi_Error_String(result));
874 return (result);
877 if ((result = set_public_modulus(hContext, *phKey,
883 result = tss_assign_secret_key_policy(hContext,
885 if (result) {
891 result = set_legacy_key_params(*phKey);
892 if (result) {
902 if ((result = Tspi_GetAttribData(*phKey, TSS_TSPATTRIB_KEY_BLOB,
905 result, Trspi_Error_String(result));
933 TSS_RESULT result;
936 if ((result = Tspi_Context_CreateObject(hContext,
939 result, Trspi_Error_String(result));
940 return (result);
942 if ((result = Tspi_Policy_AssignToObject(hPolicy, hKey))) {
944 result, Trspi_Error_String(result));
948 result = Tspi_Policy_SetSecret(hPolicy, TSS_SECRET_MODE_NONE,
951 result = Tspi_Policy_SetSecret(hPolicy, TSS_SECRET_MODE_SHA1,
954 if (result != TSS_SUCCESS) {
956 result, Trspi_Error_String(result));
960 if (result != TSS_SUCCESS)
962 return (result);
977 TSS_RESULT result;
995 result = tss_assign_secret_key_policy(hContext, TSS_POLICY_USAGE,
998 return (result);
1012 TSS_RESULT result;
1017 if ((result = Tspi_Context_GetTpmObject(hContext, &hTPM))) {
1019 result, Trspi_Error_String(result));
1024 if ((result = Tspi_Context_LoadKeyByUUID(hContext,
1027 result, Trspi_Error_String(result));
1030 if ((result = Tspi_GetPolicyObject(*hSRK, TSS_POLICY_USAGE,
1033 result, Trspi_Error_String(result));
1036 if ((result = Tspi_Policy_SetSecret(hPolicy, TSS_SECRET_MODE_SHA1,
1039 result, Trspi_Error_String(result));
1044 return (result);
1082 TSS_RESULT result;
1089 result = Tspi_Context_GetKeyByUUID(hContext,
1091 if (result) {
1093 result, Trspi_Error_String(result));
1094 return (result);
1098 result = tss_assign_secret_key_policy(hContext,
1100 if (result)
1101 return (result);
1104 result = Tspi_Key_LoadKey(*hKey, hParent);
1105 if (result)
1107 result, Trspi_Error_String(result));
1109 return (result);
1115 TSS_RESULT result;
1121 if ((result = token_load_srk(hContext, &hSRK))) {
1122 return (result);
1124 if ((result = load_mrk(hContext, hSRK, &hMRK)))
1125 return (result);
1127 result = tss_find_and_load_key(hContext,
1130 if (result)
1131 return (result);
1133 return (result);
1139 TSS_RESULT result;
1141 if ((result = Tspi_SetAttribUint32(hKey,
1146 result, Trspi_Error_String(result));
1147 return (result);
1150 if ((result = Tspi_SetAttribUint32(hKey,
1155 result, Trspi_Error_String(result));
1156 return (result);
1159 return (result);
1166 TSS_RESULT result;
1168 if ((result = Tspi_Context_CreateObject(hContext,
1171 result, Trspi_Error_String(result));
1172 return (result);
1175 result = tss_assign_secret_key_policy(hContext,
1177 if (result) {
1179 return (result);
1184 result = tss_assign_secret_key_policy(hContext,
1186 if (result) {
1188 return (result);
1193 result = set_legacy_key_params(*phKey);
1194 if (result) {
1196 return (result);
1200 if ((result = Tspi_Key_CreateKey(*phKey, hParentKey, 0))) {
1202 result, Trspi_Error_String(result));
1206 return (result);
1216 TSS_RESULT result;
1220 if ((result = Tspi_Context_CreateObject(hContext,
1223 result, Trspi_Error_String(result));
1224 return (result);
1227 if ((result = Tspi_Policy_SetSecret(hPolicy, TSS_SECRET_MODE_SHA1,
1230 result, Trspi_Error_String(result));
1231 return (result);
1234 if ((result = Tspi_ChangeAuth(hObjectToChange, hParentObject,
1237 result, Trspi_Error_String(result));
1245 if ((result = Tspi_Context_UnregisterKey(hContext,
1248 result, Trspi_Error_String(result));
1250 if ((result = Tspi_Context_RegisterKey(hContext, hObjectToChange,
1253 result, Trspi_Error_String(result));
1255 return (result);
1263 TSS_RESULT result;
1288 if (result = tss_generate_key(hContext, initFlags, passHash,
1301 result = Tspi_Context_RegisterKey(hContext, *phKey,
1304 if (result == TSS_SUCCESS) {
1312 result = Tspi_Context_UnregisterKey(hContext,
1334 TSS_RESULT result;
1337 if ((result = Tspi_Context_CreateObject(hContext,
1340 result, Trspi_Error_String(result));
1349 if ((result = Tspi_Data_Bind(hEncData, hKey,
1352 result, Trspi_Error_String(result));
1357 result = Tspi_Data_Unbind(hEncData, hKey, &ulUnboundDataLen,
1359 if (result == TPM_E_AUTHFAIL) {
1362 result, Trspi_Error_String(result));
1364 } else if (result != TSS_SUCCESS) {
1366 result, Trspi_Error_String(result));
1387 TSS_RESULT result;
1407 if ((result = tss_generate_key(hContext, initFlags, NULL, hMRK,
1415 result = Tspi_Context_RegisterKey(hContext, hPrivateRootKey,
1420 if (result) {
1436 if ((result = Tspi_Key_LoadKey(hPrivateRootKey, hMRK))) {
1438 result, Trspi_Error_String(result));
1457 if ((result = Tspi_Key_LoadKey(hPrivateLeafKey, hPrivateRootKey))) {
1459 result, Trspi_Error_String(result));
1491 TSS_RESULT result;
1511 if ((result = tss_generate_key(hContext, initFlags, NULL, hMRK,
1519 result = Tspi_Context_RegisterKey(hContext, hPublicRootKey,
1524 if (result) {
1540 if ((result = Tspi_Key_LoadKey(hPublicRootKey, hMRK))) {
1541 stlogit("Tspi_Key_LoadKey: 0x%x - %s", result,
1542 Trspi_Error_String(result));
1557 if ((result = Tspi_Key_LoadKey(hPublicLeafKey, hPublicRootKey))) {
1559 result, Trspi_Error_String(result));
1596 TSS_RESULT result;
1603 if ((result = token_load_srk(hContext, &hSRK)))
1606 if ((result = load_mrk(hContext, hSRK, &hMRK)))
1607 return (result);
1614 if ((result = token_load_public_root_key(hContext))) {
1615 if (result == TPM_E_DECRYPT_ERROR) {
1670 result = tss_find_and_load_key(
1675 if (result) {
1683 result = tss_find_and_load_key(
1688 if (result) {
1781 TSS_RESULT result;
1788 if ((result = load_mrk(hContext, hSRK, &hMRK)))
1789 return (result);
1802 result = tss_find_and_load_key(
1806 if (result) {
1813 result = tss_find_and_load_key(
1819 if (result) {
1972 TSS_RESULT result;
2002 result = Tspi_Context_GetKeyByUUID(hContext,
2005 if (result)
2011 result = Tspi_Key_LoadKey(hPublicRootKey, hMRK);
2012 if (result) {
2023 result = Tspi_Context_GetKeyByUUID(hContext,
2025 if (result) {
2030 result = tss_assign_secret_key_policy(hContext, TSS_POLICY_USAGE,
2032 if (result) {
2037 result = Tspi_Key_LoadKey(hPublicLeafKey, hPublicRootKey);
2038 if (result) {
2144 TSS_RESULT result;
2149 if ((result = Tspi_Context_CreateObject(hContext,
2152 result, Trspi_Error_String(result));
2156 if ((result = Tspi_SetAttribData(hEncData,
2160 result, Trspi_Error_String(result));
2165 if ((result = Tspi_Data_Unbind(hEncData, hKey, &buf_size, &buf))) {
2167 result, Trspi_Error_String(result));
2196 TSS_RESULT result;
2225 if ((result = token_load_public_root_key(hContext))) {
2256 if ((result = tss_generate_key(hContext, initFlags, authData,
2258 return (result);
2261 if ((result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_KEY_BLOB,
2264 result, Trspi_Error_String(result));
2284 if ((result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_RSAKEY_INFO,
2287 result, Trspi_Error_String(result));
2288 return (result);
2321 TSS_RESULT result;
2333 if ((result = token_load_public_root_key(hContext)))
2371 result = Tspi_Key_LoadKey(*phKey, hParentKey);
2372 if (result) {
2375 result, Trspi_Error_String(result));
2384 if ((result = Tspi_Context_LoadKeyByBlob(hContext,
2389 result, Trspi_Error_String(result));
2407 if ((result = token_unwrap_auth_data(hContext,
2413 if ((result = Tspi_GetPolicyObject(*phKey,
2416 result, Trspi_Error_String(result));
2427 if ((result = Tspi_Context_CreateObject(hContext,
2432 result, Trspi_Error_String(result));
2436 if ((result = Tspi_Policy_SetSecret(hPolicy,
2441 result, Trspi_Error_String(result));
2445 if ((result = Tspi_Policy_AssignToObject(hPolicy,
2449 result, Trspi_Error_String(result));
2452 } else if ((result = Tspi_Policy_SetSecret(hPolicy,
2455 result, Trspi_Error_String(result));
2474 TSS_RESULT result;
2481 if ((result = Tspi_Context_CreateObject(hContext,
2484 result, Trspi_Error_String(result));
2492 if ((result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_RSAKEY_INFO,
2495 result, Trspi_Error_String(result));
2496 return (result);
2506 if ((result = Tspi_SetAttribData(hEncData,
2511 result, Trspi_Error_String(result));
2516 if ((result = Tspi_Data_Unbind(hEncData, hKey,
2519 result, Trspi_Error_String(result));
2573 TSS_RESULT result;
2583 if ((result = Tspi_Context_CreateObject(hContext,
2586 result, Trspi_Error_String(result));
2591 if ((result = Tspi_Hash_SetHashValue(hHash, in_data_len,
2594 result, Trspi_Error_String(result));
2599 result = Tspi_Hash_VerifySignature(hHash, hKey, sig_len, sig);
2600 if (result != TSS_SUCCESS &&
2601 TPMTOK_TSS_ERROR_CODE(result) != TSS_E_FAIL) {
2603 result, Trspi_Error_String(result));
2606 if (TPMTOK_TSS_ERROR_CODE(result) == TSS_E_FAIL) {
2624 TSS_RESULT result;
2636 if ((result = Tspi_Context_CreateObject(hContext,
2639 result, Trspi_Error_String(result));
2644 if ((result = Tspi_Hash_SetHashValue(hHash, in_data_len,
2647 result, Trspi_Error_String(result));
2652 if ((result = Tspi_Hash_Sign(hHash, hKey, &sig_len, &sig))) {
2654 result, Trspi_Error_String(result));
2679 TSS_RESULT result;
2687 if ((result = Tspi_Context_CreateObject(hContext,
2690 result, Trspi_Error_String(result));
2697 if ((result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_RSAKEY_INFO,
2700 result, Trspi_Error_String(result));
2701 return (result);
2711 if ((result = Tspi_GetAttribUint32(hKey, TSS_TSPATTRIB_KEY_INFO,
2714 Trspi_Error_String(result));
2715 return (result);
2717 if ((result = Tspi_GetAttribUint32(hKey, TSS_TSPATTRIB_KEY_INFO,
2720 Trspi_Error_String(result));
2721 return (result);
2743 if ((result = Tspi_Data_Bind(hEncData, hKey,
2746 result, Trspi_Error_String(result));
2750 if ((result = Tspi_GetAttribData(hEncData,
2755 result, Trspi_Error_String(result));
2822 TSS_RESULT result;
2837 if ((result = Tspi_GetAttribData(hKey, TSS_TSPATTRIB_RSAKEY_INFO,
2840 result, Trspi_Error_String(result));