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 mod keymaster_attributes;
25 mod keys;
26 mod monotonic_clock;
27 mod rng;
28 mod rpc;
29 mod secure_deletion_secret_manager;
30 mod secure_storage_manager;
31 
32 pub use ipc_manager::handle_port_connections;
33 pub use key_wrapper::{TrustyAes, TrustyStorageKeyWrapper};
34 pub use keys::legacy::TrustyLegacyKeyBlobHandler;
35 pub use keys::TrustyKeys;
36 pub use monotonic_clock::TrustyMonotonicClock;
37 pub use rng::TrustyRng;
38 pub use rpc::TrustyRpc;
39 pub use secure_deletion_secret_manager::{SharedSddManager, TrustySecureDeletionSecretManager};
40 pub use secure_storage_manager::{AttestationIds, CertSignInfo};
41 
42 /// Implementation of bootloader status indication for Trusty.
43 // TODO: maintain the bootloader status and update it as the bootloader informs
44 // Trusty when it is done.
45 pub struct TrustyBootLoaderStatus;
46 impl kmr_ta::device::BootloaderStatus for TrustyBootLoaderStatus {}
47 
48 #[cfg(test)]
49 mod tests {
50     test::init!();
51 }
52