blob: b0e88f6f8fb7e6883766a67dedbba18739a42f8c [file] [log] [blame]
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// The original Work has been changed by NXP.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Copyright 2022 NXP
//
cc_library {
name: "libjc_keymint.nxp",
defaults: [
"keymaster_defaults",
],
srcs: [
"CborConverter.cpp",
"JavacardKeyMintDevice.cpp",
"JavacardKeyMintOperation.cpp",
"JavacardRemotelyProvisionedComponentDevice.cpp",
"JavacardSecureElement.cpp",
"JavacardSharedSecret.cpp",
"JavacardKeyMintUtils.cpp",
"keymint_utils.cpp",
],
cflags:[
"-O0",
"-DNXP_EXTNS",
],
shared_libs: [
"android.hardware.security.secureclock-V1-ndk",
"android.hardware.security.sharedsecret-V1-ndk",
"libbase",
"libbinder",
"libcppbor_external",
"libkeymaster_portable",
"libkeymaster_messages",
"libsoft_attestation_cert",
"liblog",
"libcrypto",
"libcutils",
"libjc_keymint_transport.nxp",
"libbinder_ndk",
"android.hardware.security.keymint-V2-ndk",
"android.hardware.security.rkp-V2-ndk",
],
export_include_dirs: [
".",
],
product_variables: {
debuggable: {
cflags: ["-DDCHECK_ALWAYS_ON"],
},
},
vendor_available: true,
}
cc_library {
name: "libjc_keymint_transport.nxp",
vendor_available: true,
srcs: [
"transport/*.cpp",
],
cflags: [
"-DOMAPI_TRANSPORT",
"-DINTERVAL_TIMER",
"-DNXP_EXTNS",
],
export_include_dirs: [
"transport/include"
],
export_shared_lib_headers: [
"android.hardware.secure_element@1.0",
"android.hardware.secure_element@1.1",
"android.hardware.secure_element@1.2",
],
shared_libs: [
"android.hardware.secure_element@1.0",
"android.hardware.secure_element@1.1",
"android.hardware.secure_element@1.2",
"android.se.omapi-V1-ndk",
"libbase",
"liblog",
"libcutils",
"libutils",
"libhardware",
"libhidlbase",
"libbinder_ndk",
],
}
cc_binary {
name: "android.hardware.security.keymint-service.strongbox.nxp",
relative_install_path: "hw",
init_rc: ["android.hardware.security.keymint-service.strongbox.nxp.rc"],
vintf_fragments: [
"android.hardware.security.keymint-service.strongbox.nxp.xml",
"android.hardware.security.sharedsecret-service.strongbox.nxp.xml",
],
vendor: true,
cflags: [
"-Wall",
"-Wextra",
"-DOMAPI_TRANSPORT",
"-DNXP_EXTNS",
],
shared_libs: [
"android.hardware.security.sharedsecret-V1-ndk",
"android.se.omapi-V1-ndk",
"libbase",
"libbinder_ndk",
"libcppbor_external",
"libcrypto",
"libkeymaster_portable",
"libjc_keymint.nxp",
"libjc_keymint_transport.nxp",
"liblog",
"libutils",
"libhidlbase",
"android.hardware.security.keymint-V2-ndk",
"android.hardware.security.rkp-V2-ndk",
],
srcs: [
"service.cpp",
],
required: [
"RemoteProvisioner",
"android.hardware.strongbox_keystore.nxp.xml",
],
}
prebuilt_etc {
name: "android.hardware.strongbox_keystore.nxp.xml",
sub_dir: "permissions",
vendor: true,
src: "android.hardware.strongbox_keystore.nxp.xml",
}