blob: a6c139c6872d308e8ac659d608b57dba695ef609 [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.
#ifndef LIBHWSEC_FRONTEND_OPTEE_PLUGIN_FRONTEND_H_
#define LIBHWSEC_FRONTEND_OPTEE_PLUGIN_FRONTEND_H_
#include <optional>
#include <string>
#include <vector>
#include <brillo/secure_blob.h>
#include "libhwsec/frontend/frontend.h"
#include "libhwsec/status.h"
namespace hwsec {
class OpteePluginFrontend : public Frontend {
public:
~OpteePluginFrontend() override = default;
// Send the raw command.
virtual StatusOr<brillo::Blob> SendRawCommand(
const brillo::Blob& command) const = 0;
// Get the widevine root of trust certificate.
virtual StatusOr<brillo::Blob> GetRootOfTrustCert() const = 0;
// Get the chip identity key certificate.
virtual StatusOr<brillo::Blob> GetChipIdentifyKeyCert() const = 0;
// Get the Pkcs7 certificate chain.
virtual StatusOr<brillo::Blob> GetPkcs7CertChain() const = 0;
// Get the PEM certificate chain.
// Note: The PEM format only contains the visible characters.
virtual StatusOr<std::string> GetPemCertChain() const = 0;
};
} // namespace hwsec
#endif // LIBHWSEC_FRONTEND_OPTEE_PLUGIN_FRONTEND_H_