aboutsummaryrefslogtreecommitdiff
path: root/BUILD
blob: 7aae4d5f61ae12284b01daf9a7eec767b55df075 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
COPTS = [
    "-std=c++11",
    "-g",
    "-Wall",
    "-Wextra",
]

cc_binary(
    name = "runtests",
    srcs = [
        "src/aes-cmac-tests.cc",
        "src/gtest_with_gflags_main.cc",
        "src/keymaster-import-key-tests.cc",
        "src/keymaster-import-wrapped-key-tests.cc",
        "src/keymaster-provision-tests.cc",
        "src/nugget_core_tests.cc",
        "src/runtests.cc",
        "src/weaver_tests.cc",
        "src/avb_tests.cc",
        "src/transport_tests.cc",
    ],
    copts = COPTS,
    deps = [
        ":dcrypto_test_data",
        ":km_test_lib",
        ":reset_key_data_lib",
        ":util",
        "@boringssl//:ssl",
        "@com_github_gflags_gflags//:gflags",
        "@gtest//:gtest",
        "@nugget_core_nugget//:config_chip",
        "@nugget_host_generic_libnos//:libnos",
        "@nugget_host_generic_nugget_proto//:keymaster_client_proto",
        "@nugget_host_generic_nugget_proto//:nugget_app_keymaster_keymaster_cc_proto",
        "@nugget_host_generic_nugget_proto//:nugget_app_weaver_weaver_cc_proto",
        "@nugget_host_generic_nugget_proto//:nugget_app_avb_avb_cc_proto",
        "@nugget_host_generic_nugget_proto//:weaver_client_proto",
        "@nugget_host_generic_nugget_proto//:avb_client_proto",
        "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram",
        "@nugget_test_systemtestharness_tools//:nugget_tools",
    ],
)

cc_binary(
    name = "stress_test",
    srcs = [
        "src/stress_test.cc",
    ],
    copts = COPTS,
    deps = [
        ":util",
        "@com_google_protobuf//:protobuf",
        "@nugget_core_nugget//:config_chip",
        "@nugget_host_generic_libnos//:libnos",
        "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram",
        "@nugget_test_systemtestharness_tools//:nugget_tools",
    ],
)

cc_binary(
    name = "cavptests",
    srcs = [
        "src/cavptests.cc",
        "src/gtest_with_gflags_main.cc",
        "src/test-data/NIST-CAVP/aes-gcm-cavp.h",
    ],
    copts = COPTS,
    includes = [
        "src/test-data/NIST-CAVP",
    ],
    deps = [
        ":util",
        "@com_github_gflags_gflags//:gflags",
        "@gtest//:gtest",
        "@nugget_host_generic_libnos//:libnos",
        "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram",
    ],
)

cc_library(
    name = "util",
    srcs = [
        "src/util.cc",
    ],
    hdrs = [
        "src/macros.h",
        "src/util.h",
    ],
    copts = COPTS,
    deps = [
        "@com_github_gflags_gflags//:gflags",
        "@nugget_host_generic_nugget_proto//:nugget_app_protoapi_control_cc_proto",
        "@nugget_host_generic_nugget_proto//:nugget_app_protoapi_testing_api_cc_proto",
        "@nugget_test_systemtestharness_tools//:nugget_tools",
        "@nugget_thirdparty_ahdlc//:ahdlc",
    ],
)

cc_library(
    name = "reset_key_data_lib",
    srcs = [
        "src/test-data/test-keys/reset_key_data.cc",
    ],
    hdrs = [
        "src/test-data/test-keys/reset_key_data.h",
    ],
)

cc_library(
    name = "km_test_lib",
    srcs = [
        "src/test-data/test-keys/rsa.cc",
    ],
    hdrs = [
        "src/test-data/test-keys/rsa.h",
    ],
)

cc_library(
    name = "dcrypto_test_data",
    srcs = [],
    hdrs = [
        "src/test-data/dcrypto/aes-cmac-rfc4493.h",
    ],
)