blob: 1062e5e14570dab6344c9ae815bf4be1c092a2d6 [file] [log] [blame] [edit]
// Copyright 2022 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "vtpm/backends/vek_cert.h"
#include <string>
#include <trunks/tpm_generated.h>
namespace vtpm {
VekCert::VekCert(VirtualEndorsement* e) : endorsement_(e) {}
trunks::TPM_RC VekCert::Get(std::string& blob) {
trunks::TPM_RC rc = endorsement_->Create();
if (rc) {
return rc;
}
blob = endorsement_->GetEndorsementCertificate();
return trunks::TPM_RC_SUCCESS;
}
} // namespace vtpm