summaryrefslogtreecommitdiff
path: root/keystore/Android.bp
blob: c79d00ba10c3d37f64351cb42398404a0e7da7ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_security_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    //   SPDX-license-identifier-BSD
    default_applicable_licenses: ["system_security_license"],
}

cc_defaults {
    name: "keystore_defaults",

    cflags: [
        "-Wall",
        "-Werror",
        "-Wextra",
        "-Wunused",
    ],

    sanitize: {
        misc_undefined: [
             "signed-integer-overflow",
             "unsigned-integer-overflow",
             "shift",
             "integer-divide-by-zero",
             "implicit-unsigned-integer-truncation",
             // BUG: 123630767
             //"implicit-signed-integer-truncation",
             "implicit-integer-sign-change",
        ],
    },

}

cc_binary {
    name: "keystore_cli_v2",
    defaults: [
        "keystore_defaults",
        "keystore2_use_latest_aidl_ndk_shared",
    ],

    cflags: [
        "-DKEYMASTER_NAME_TAGS",
        "-Wno-unused-parameter",
    ],
    srcs: [
        "keystore_cli_v2.cpp",
        "keystore_client.proto",
    ],
    shared_libs: [
        "android.security.apc-ndk",
        "libbinder",
        "libbinder_ndk",
        "libchrome",
        "libcrypto",
        "libkeymint_support",
        "libprotobuf-cpp-lite",
        "libutils",
    ],

    local_include_dirs: ["include"],
}

// Library used by both keystore and credstore for generating the ASN.1 stored
// in Tag::ATTESTATION_APPLICATION_ID
cc_library {
    name: "libkeystore-attestation-application-id",
    defaults: ["keystore_defaults"],

    srcs: [
        "keystore_attestation_id.cpp",
    ],
    shared_libs: [
        "android.security.aaid_aidl-cpp",
        "libbase",
        "libbinder",
        "libcrypto",
        "libhidlbase",
        "liblog",
        "libutils",
    ],

    export_include_dirs: ["include"],
}

// Library for keystore clients using the WiFi HIDL interface
cc_library {
    name: "libkeystore-wifi-hidl",
    defaults: ["keystore_defaults"],

    srcs: ["keystore_get_wifi_hidl.cpp"],
    shared_libs: [
        "android.system.wifi.keystore@1.0",
        "libbase",
        "libhidlbase",
        "liblog",
        "libutils",
    ],

    export_include_dirs: ["include"],

    vendor: true,
}