Vadim Bendebury | 5679752 | 2015-05-20 10:32:25 -0700 | [diff] [blame] | 1 | // This file was extracted from the TCG Published |
| 2 | // Trusted Platform Module Library |
| 3 | // Part 3: Commands |
| 4 | // Family "2.0" |
| 5 | // Level 00 Revision 01.16 |
| 6 | // October 30, 2014 |
| 7 | |
| 8 | #include "InternalRoutines.h" |
| 9 | #include "NV_ReadPublic_fp.h" |
| 10 | TPM_RC |
| 11 | TPM2_NV_ReadPublic( |
| 12 | NV_ReadPublic_In *in, // IN: input parameter list |
| 13 | NV_ReadPublic_Out *out // OUT: output parameter list |
| 14 | ) |
| 15 | { |
| 16 | NV_INDEX nvIndex; |
| 17 | |
| 18 | // Command Output |
| 19 | |
| 20 | // Get NV index info |
| 21 | NvGetIndexInfo(in->nvIndex, &nvIndex); |
| 22 | |
| 23 | // Copy data to output |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 24 | out->nvPublic.t.nvPublic = nvIndex.publicArea; |
Vadim Bendebury | 5679752 | 2015-05-20 10:32:25 -0700 | [diff] [blame] | 25 | |
| 26 | // Compute NV name |
ChromeOS Developer | e85c65b | 2015-07-10 10:12:43 -0700 | [diff] [blame] | 27 | out->nvName.t.size = NvGetName(in->nvIndex, &out->nvName.t.name); |
Vadim Bendebury | 5679752 | 2015-05-20 10:32:25 -0700 | [diff] [blame] | 28 | |
| 29 | return TPM_RC_SUCCESS; |
| 30 | } |