| OLD | NEW |
| 1 /* | 1 /* |
| 2 * | 2 * |
| 3 * Copyright (C) International Business Machines Corp., 2007 | 3 * Copyright (C) International Business Machines Corp., 2007 |
| 4 * | 4 * |
| 5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License as published by | 6 * it under the terms of the GNU General Public License as published by |
| 7 * the Free Software Foundation; either version 2 of the License, or | 7 * the Free Software Foundation; either version 2 of the License, or |
| 8 * (at your option) any later version. | 8 * (at your option) any later version. |
| 9 * | 9 * |
| 10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 result = Tspi_Key_LoadKey(hKey, hSRK); | 184 result = Tspi_Key_LoadKey(hKey, hSRK); |
| 185 if (result != TSS_SUCCESS) { | 185 if (result != TSS_SUCCESS) { |
| 186 print_error("Tspi_Key_LoadKey", result); | 186 print_error("Tspi_Key_LoadKey", result); |
| 187 Tspi_Context_FreeMemory( hContext, NULL ); | 187 Tspi_Context_FreeMemory( hContext, NULL ); |
| 188 Tspi_Context_Close(hContext); | 188 Tspi_Context_Close(hContext); |
| 189 exit(result); | 189 exit(result); |
| 190 } | 190 } |
| 191 | 191 |
| 192 //Set Ownerevict bit | 192 //Set Ownerevict bit |
| 193 result = Tspi_TPM_KeyControlOwner(hTPM, hKey, TSS_TSPATTRIB_KEYCONTROL_O
WNEREVICT, | 193 result = Tspi_TPM_KeyControlOwner(hTPM, hKey, TSS_TSPATTRIB_KEYCONTROL_O
WNEREVICT, |
| 194 » » » » » TRUE, &Uuid); | 194 » » » » » FALSE, &Uuid); |
| 195 |
| 195 if (result != TSS_SUCCESS) { | 196 if (result != TSS_SUCCESS) { |
| 196 print_error(nameOfFunction, result); | 197 print_error(nameOfFunction, result); |
| 197 print_end_test(nameOfFunction); | 198 print_end_test(nameOfFunction); |
| 198 Tspi_Context_FreeMemory( hContext, NULL ); | 199 Tspi_Context_FreeMemory( hContext, NULL ); |
| 199 Tspi_Context_Close(hContext); | 200 Tspi_Context_Close(hContext); |
| 200 exit(result); | 201 exit(result); |
| 201 } else { | 202 } else { |
| 202 print_success(nameOfFunction, result); | 203 print_success(nameOfFunction, result); |
| 203 print_end_test(nameOfFunction); | 204 print_end_test(nameOfFunction); |
| 205 Tspi_TPM_KeyControlOwner(hTPM, hKey, TSS_TSPATTRIB_KEYCONTROL_OW
NEREVICT, |
| 206 FALSE, &Uuid); |
| 207 Tspi_Key_UnloadKey(hKey); |
| 204 Tspi_Context_FreeMemory( hContext, NULL ); | 208 Tspi_Context_FreeMemory( hContext, NULL ); |
| 205 Tspi_Context_Close(hContext); | 209 Tspi_Context_Close(hContext); |
| 206 exit(0); | 210 exit(0); |
| 207 } | 211 } |
| 208 } | 212 } |
| OLD | NEW |