• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 //! This library implements the functionality used by the KeyMint Trusty
18 //! application.
19 
20 mod ffi_bindings;
21 mod ipc_manager;
22 mod key_wrapper;
23 mod keybox;
24 // Trusty should not lint generated code
25 #[allow(warnings)]
26 mod keymaster_attributes;
27 mod keys;
28 mod monotonic_clock;
29 mod rng;
30 mod rpc;
31 mod secure_deletion_secret_manager;
32 mod secure_storage_manager;
33 
34 pub use ipc_manager::handle_port_connections;
35 pub use key_wrapper::{TrustyAes, TrustyStorageKeyWrapper};
36 pub use keys::legacy::TrustyLegacyKeyBlobHandler;
37 pub use keys::TrustyKeys;
38 pub use monotonic_clock::TrustyMonotonicClock;
39 pub use rng::TrustyRng;
40 pub use rpc::TrustyRpc;
41 pub use secure_deletion_secret_manager::{SharedSddManager, TrustySecureDeletionSecretManager};
42 pub use secure_storage_manager::{AttestationIds, CertSignInfo};
43 
44 /// Implementation of bootloader status indication for Trusty.
45 // TODO: maintain the bootloader status and update it as the bootloader informs
46 // Trusty when it is done.
47 pub struct TrustyBootLoaderStatus;
48 impl kmr_ta::device::BootloaderStatus for TrustyBootLoaderStatus {}
49 
50 #[cfg(test)]
51 mod tests {
52     test::init!();
53 }
54