blob: bc4762598c318264caa8a56cf725c05b41d57717 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_
#define CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_
#include <string>
#include "chromeos/chromeos_export.h"
namespace chromeos {
// Wrappers of the D-Bus method calls for working with Tpm. Note that all of
// these are blocking and thus must not be called on the UI thread!
namespace cryptohome_util {
// Returns whether Tpm is presented and enabled.
CHROMEOS_EXPORT bool TpmIsEnabled();
// Returns whether device has already been owned.
CHROMEOS_EXPORT bool TpmIsOwned();
// Returns whether device is being owned (Tpm password is generating).
CHROMEOS_EXPORT bool TpmIsBeingOwned();
CHROMEOS_EXPORT bool InstallAttributesGet(const std::string& name,
std::string* value);
CHROMEOS_EXPORT bool InstallAttributesSet(const std::string& name,
const std::string& value);
CHROMEOS_EXPORT bool InstallAttributesFinalize();
CHROMEOS_EXPORT bool InstallAttributesIsInvalid();
CHROMEOS_EXPORT bool InstallAttributesIsFirstInstall();
} // namespace cryptohome_util
} // namespace chromeos
#endif // CHROMEOS_CRYPTOHOME_CRYPTOHOME_UTIL_H_
|