diff options
Diffstat (limited to 'src/usr/secureboot/trusted/trustedbootCmds.C')
-rw-r--r-- | src/usr/secureboot/trusted/trustedbootCmds.C | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/usr/secureboot/trusted/trustedbootCmds.C b/src/usr/secureboot/trusted/trustedbootCmds.C index 709675c2d..9a73a7052 100644 --- a/src/usr/secureboot/trusted/trustedbootCmds.C +++ b/src/usr/secureboot/trusted/trustedbootCmds.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -237,6 +237,14 @@ errlHndl_t tpmMarshalCommandData(TPM2_BaseIn* i_cmd, } break; + case TPM_CC_GetRandom: + { + auto cmdPtr = reinterpret_cast<TPM2_2ByteIn*>(i_cmd); + sBuf = TPM2_2ByteIn_marshal(cmdPtr, sBuf, + i_bufsize, o_cmdSize); + } + break; + default: { // Command code not supported @@ -385,6 +393,14 @@ errlHndl_t tpmUnmarshalResponseData(uint32_t i_commandCode, } break; + case TPM_CC_GetRandom: + { + auto respPtr = reinterpret_cast<TPM2_GetRandomOut*>(o_outBuf); + sBuf = TPM2B_DIGEST_unmarshal(&respPtr->randomBytes, sBuf, + &i_respBufSize); + } + break; + default: { // Command code not supported |