• 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        "libmemunreachable",
73        "android.hardware.security.keymint-V2-ndk",
74        "android.hardware.security.rkp-V2-ndk",
75    ],
76    export_include_dirs: [
77        ".",
78    ],
79    product_variables: {
80        debuggable: {
81            cflags: ["-DDCHECK_ALWAYS_ON"],
82        },
83    },
84    vendor_available: true,
85}
86
87cc_binary {
88    name: "android.hardware.security.keymint-service.strongbox.nxp",
89    relative_install_path: "hw",
90    init_rc: ["android.hardware.security.keymint-service.strongbox.nxp.rc"],
91    vintf_fragments: [
92        "android.hardware.security.keymint-service.strongbox.nxp.xml",
93        "android.hardware.security.sharedsecret-service.strongbox.nxp.xml",
94    ],
95    vendor: true,
96    cflags: [
97        "-Wall",
98        "-Wextra",
99        "-DOMAPI_TRANSPORT",
100        "-DNXP_EXTNS",
101    ],
102    shared_libs: [
103        "android.hardware.security.sharedsecret-V1-ndk",
104        "android.se.omapi-V1-ndk",
105        "libbase",
106        "libbinder_ndk",
107        "libcppbor",
108        "libcrypto",
109        "libkeymaster_portable",
110        "libjc_keymint.nxp",
111        "libjc_keymint_transport.nxp",
112        "liblog",
113        "libutils",
114        "libhidlbase",
115        "android.hardware.security.keymint-V2-ndk",
116        "android.hardware.security.rkp-V2-ndk",
117    ],
118    srcs: [
119        "service.cpp",
120    ],
121    required: [
122        "android.hardware.strongbox_keystore.nxp.xml",
123    ],
124}
125
126prebuilt_etc {
127    name: "android.hardware.strongbox_keystore.nxp.xml",
128    sub_dir: "permissions",
129    vendor: true,
130    src: "android.hardware.strongbox_keystore.nxp.xml",
131}
132