• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef KEYSTORE_INCLUDE_KEYSTORE_KEYMASTERCERTIFICATECHAIN_H_
16 #define KEYSTORE_INCLUDE_KEYSTORE_KEYMASTERCERTIFICATECHAIN_H_
17 
18 #include <binder/Parcelable.h>
19 #include <keystore/keymaster_types.h>
20 
21 namespace android {
22 namespace security {
23 namespace keymaster {
24 
25 // struct for serializing keymaster_cert_chain_t's
26 struct KeymasterCertificateChain : public ::android::Parcelable {
KeymasterCertificateChainKeymasterCertificateChain27     KeymasterCertificateChain(){};
KeymasterCertificateChainKeymasterCertificateChain28     explicit KeymasterCertificateChain(hardware::hidl_vec<hardware::hidl_vec<uint8_t>> other)
29         : chain(std::move(other)) {}
30 
31     status_t readFromParcel(const Parcel* in) override;
32     status_t writeToParcel(Parcel* out) const override;
33 
34   private:
35     // The structure is only used as output and doesn't have getter.
36     hardware::hidl_vec<hardware::hidl_vec<uint8_t>> chain;
37 };
38 
39 }  // namespace keymaster
40 }  // namespace security
41 }  // namespace android
42 
43 #endif  // KEYSTORE_INCLUDE_KEYSTORE_KEYMASTERCERTIFICATECHAIN_H_
44