• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2020 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
16// The original Work has been changed by NXP.
17//
18// Licensed under the Apache License, Version 2.0 (the "License");
19// you may not use this file except in compliance with the License.
20// You may obtain a copy of the License at
21//
22// http://www.apache.org/licenses/LICENSE-2.0
23//
24// Unless required by applicable law or agreed to in writing, software
25// distributed under the License is distributed on an "AS IS" BASIS,
26// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27// See the License for the specific language governing permissions and
28// limitations under the License.
29//
30// Copyright 2022-2023 NXP
31//
32
33package {
34    default_applicable_licenses: [
35        "//hardware/nxp/keymint:hardware_nxp_keymint_license",
36    ],
37}
38
39cc_library {
40    name: "libjc_keymint.nxp",
41    defaults: [
42        "keymaster_defaults",
43    ],
44    srcs: [
45        "CborConverter.cpp",
46        "JavacardKeyMintDevice.cpp",
47        "JavacardKeyMintOperation.cpp",
48        "JavacardRemotelyProvisionedComponentDevice.cpp",
49        "JavacardSecureElement.cpp",
50        "JavacardSharedSecret.cpp",
51        "JavacardKeyMintUtils.cpp",
52        "keymint_utils.cpp",
53    ],
54    cflags: [
55        "-O0",
56        "-DNXP_EXTNS",
57    ],
58    shared_libs: [
59        "android.hardware.security.secureclock-V1-ndk",
60        "android.hardware.security.sharedsecret-V1-ndk",
61        "libbase",
62        "libbinder",
63        "libcppbor",
64        "libkeymaster_portable",
65        "libkeymaster_messages",
66        "libsoft_attestation_cert",
67        "liblog",
68        "libcrypto",
69        "libcutils",
70        "libjc_keymint_transport.nxp",
71        "libbinder_ndk",
72        "android.hardware.security.keymint-V2-ndk",
73        "android.hardware.security.rkp-V2-ndk",
74    ],
75    export_include_dirs: [
76        ".",
77    ],
78    product_variables: {
79        debuggable: {
80            cflags: ["-DDCHECK_ALWAYS_ON"],
81        },
82    },
83    vendor_available: true,
84}
85
86cc_binary {
87    name: "android.hardware.security.keymint-service.strongbox.nxp",
88    relative_install_path: "hw",
89    init_rc: ["android.hardware.security.keymint-service.strongbox.nxp.rc"],
90    vintf_fragments: [
91        "android.hardware.security.keymint-service.strongbox.nxp.xml",
92        "android.hardware.security.sharedsecret-service.strongbox.nxp.xml",
93    ],
94    vendor: true,
95    cflags: [
96        "-Wall",
97        "-Wextra",
98        "-DOMAPI_TRANSPORT",
99        "-DNXP_EXTNS",
100    ],
101    shared_libs: [
102        "android.hardware.security.sharedsecret-V1-ndk",
103        "android.se.omapi-V1-ndk",
104        "libbase",
105        "libbinder_ndk",
106        "libcppbor",
107        "libcrypto",
108        "libkeymaster_portable",
109        "libjc_keymint.nxp",
110        "libjc_keymint_transport.nxp",
111        "liblog",
112        "libutils",
113        "libhidlbase",
114        "android.hardware.security.keymint-V2-ndk",
115        "android.hardware.security.rkp-V2-ndk",
116    ],
117    srcs: [
118        "service.cpp",
119    ],
120    required: [
121        "android.hardware.strongbox_keystore.nxp.xml",
122    ],
123}
124
125prebuilt_etc {
126    name: "android.hardware.strongbox_keystore.nxp.xml",
127    sub_dir: "permissions",
128    vendor: true,
129    src: "android.hardware.strongbox_keystore.nxp.xml",
130}
131