static int send_old_um_trm_data()

in src/tpm_comm_linux.c [285:309]


static int send_old_um_trm_data(TPM_COMM_HANDLE handle)
{
    int result;
    unsigned char debugMsgLevel = 0, commandSent = 1;
    if ((handle->conn_info & TCI_OLD_UM_TRM) == 0)
    {
        // This is not an old TRM. No additional data are expected.
        result = 0;
    }
    else if (send_sync_bytes(handle, (const unsigned char*)&debugMsgLevel, 1) != 0)
    {
        LogError("Failure setting debugMsgLevel to TRM");
        result = MU_FAILURE;
    }
    else if (send_sync_bytes(handle, (const unsigned char*)&commandSent, 1) != 0)
    {
        LogError("Failure setting commandSent status to TRM");
        result = MU_FAILURE;
    }
    else
    {
        result = 0;
    }
    return result;
}