| # Copyright 2026 Google LLC | |
| # | |
| # 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 | |
| # | |
| # https://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. | |
| # | |
| load("@rules_cc//cc:cc_library.bzl", "cc_library") | |
| load("@rules_cc//cc:cc_test.bzl", "cc_test") | |
| package( | |
| default_testonly = True, | |
| default_visibility = ["//visibility:public"], | |
| ) | |
| cc_library( | |
| name = "test_string_utils", | |
| hdrs = ["test_string_utils.h"], | |
| deps = [ | |
| "@riegeli//riegeli/endian:endian_writing", | |
| ], | |
| ) | |
| cc_library( | |
| name = "mock_cose_verifier", | |
| hdrs = ["mock_cose_verifier.h"], | |
| deps = [ | |
| "//cose:verifier", | |
| "//proto:cose_verification_result_cc_proto", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@googletest//:gtest", | |
| ], | |
| ) | |
| cc_library( | |
| name = "mock_assertion_validator", | |
| hdrs = ["mock_assertion_validator.h"], | |
| deps = [ | |
| "//assertion:validator", | |
| "//jumbf:uri", | |
| "//validator:tracker", | |
| "@abseil-cpp//absl/container:flat_hash_set", | |
| "@googletest//:gtest", | |
| ], | |
| ) | |
| cc_library( | |
| name = "fake_claim_validator", | |
| hdrs = ["fake_claim_validator.h"], | |
| deps = [ | |
| "//claim:validator", | |
| "//constants:status_codes", | |
| "//jumbf:box", | |
| "//validator:tracker", | |
| "@abseil-cpp//absl/container:flat_hash_map", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@abseil-cpp//absl/types:span", | |
| ], | |
| ) | |
| cc_test( | |
| name = "fake_claim_validator_test", | |
| srcs = ["fake_claim_validator_test.cc"], | |
| deps = [ | |
| ":fake_claim_validator", | |
| ":proto_test_utils", | |
| ":test_validation_tracker", | |
| "//constants:status_codes", | |
| "//jumbf:box", | |
| "//proto:generator_info_cc_proto", | |
| "//proto:manifest_cc_proto", | |
| "@abseil-cpp//absl/types:span", | |
| "@googletest//:gtest_main", | |
| ], | |
| ) | |
| cc_library( | |
| name = "fake_assertion_validator", | |
| hdrs = ["fake_assertion_validator.h"], | |
| deps = [ | |
| "//assertion:validator", | |
| "//constants:status_codes", | |
| "//jumbf:uri", | |
| "//validator:tracker", | |
| "@abseil-cpp//absl/container:flat_hash_map", | |
| "@abseil-cpp//absl/container:flat_hash_set", | |
| "@abseil-cpp//absl/strings", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@abseil-cpp//absl/types:span", | |
| ], | |
| ) | |
| cc_test( | |
| name = "fake_assertion_validator_test", | |
| srcs = ["fake_assertion_validator_test.cc"], | |
| deps = [ | |
| ":fake_assertion_validator", | |
| ":proto_test_utils", | |
| ":test_validation_tracker", | |
| "//constants:status_codes", | |
| "//jumbf:box", | |
| "//jumbf:uri", | |
| "//proto:assertion_cc_proto", | |
| "//proto:ingredient_assertion_cc_proto", | |
| "//proto:manifest_cc_proto", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@abseil-cpp//absl/types:span", | |
| "@googletest//:gtest_main", | |
| ], | |
| ) | |
| cc_library( | |
| name = "crypto_testing", | |
| srcs = ["crypto_testing.cc"], | |
| hdrs = ["crypto_testing.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/log:check", | |
| "@abseil-cpp//absl/time", | |
| "@boringssl//:crypto", | |
| ], | |
| ) | |
| cc_library( | |
| name = "boringssl_utils", | |
| testonly = False, | |
| srcs = ["boringssl_utils.cc"], | |
| hdrs = ["boringssl_utils.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/base:nullability", | |
| "@abseil-cpp//absl/log:check", | |
| "@abseil-cpp//absl/log:die_if_null", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@boringssl//:crypto", | |
| ], | |
| ) | |
| cc_library( | |
| name = "cbor_utils", | |
| srcs = ["cbor_utils.cc"], | |
| hdrs = ["cbor_utils.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/log", | |
| "@abseil-cpp//absl/log:check", | |
| "@abseil-cpp//absl/strings", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@libcppbor", | |
| "@nlohmann_json//:json", | |
| ], | |
| ) | |
| cc_test( | |
| name = "cbor_utils_test", | |
| srcs = ["cbor_utils_test.cc"], | |
| deps = [ | |
| ":cbor_utils", | |
| "//cbor:parse", | |
| "//testing/proto:test_message_cc_proto", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@googletest//:gtest_main", | |
| "@libcppbor", | |
| "@nlohmann_json//:json", | |
| ], | |
| ) | |
| cc_library( | |
| name = "pem", | |
| srcs = ["pem.cc"], | |
| hdrs = ["pem.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/status", | |
| "@abseil-cpp//absl/status:status_macros", | |
| "@abseil-cpp//absl/status:statusor", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@boringssl//:crypto", | |
| "@tink_cc//proto:common_cc_proto", | |
| "@tink_cc//tink:cleartext_keyset_handle", | |
| "@tink_cc//tink:keyset_handle", | |
| "@tink_cc//tink:public_key_sign", | |
| "@tink_cc//tink/signature:config_v0", | |
| "@tink_cc//tink/signature:signature_pem_keyset_reader", | |
| ], | |
| ) | |
| cc_test( | |
| name = "pem_test", | |
| srcs = ["pem_test.cc"], | |
| deps = [ | |
| ":pem", | |
| "@abseil-cpp//absl/status", | |
| "@abseil-cpp//absl/status:status_macros", | |
| "@abseil-cpp//absl/status:status_matchers", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@googletest//:gtest_main", | |
| "@tink_cc//tink/signature:signature_pem_keyset_reader", | |
| ], | |
| ) | |
| cc_library( | |
| name = "cms", | |
| testonly = False, | |
| srcs = ["cms.cc"], | |
| hdrs = ["cms.h"], | |
| deps = [ | |
| "//crypto:algorithms", | |
| "//crypto:hash", | |
| "//crypto/default:hasher", | |
| "@abseil-cpp//absl/functional:function_ref", | |
| "@abseil-cpp//absl/status", | |
| "@abseil-cpp//absl/status:status_macros", | |
| "@abseil-cpp//absl/status:statusor", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@abseil-cpp//absl/time", | |
| "@abseil-cpp//absl/types:span", | |
| "@boringssl//:crypto", | |
| ], | |
| ) | |
| cc_library( | |
| name = "jumbf_utils", | |
| srcs = ["jumbf_utils.cc"], | |
| hdrs = ["jumbf_utils.h"], | |
| deps = [ | |
| "//assertion:assertion_encoder", | |
| "//constants:labels", | |
| "//crypto:hash", | |
| "//crypto/default:hasher", | |
| "//jumbf:box", | |
| "//jumbf:constants", | |
| "//jumbf:parse", | |
| "//jumbf:test_utils", | |
| "//proto:assertion_cc_proto", | |
| "//utils:byte_readers", | |
| "//utils:byte_writers", | |
| "//uuid", | |
| "@abseil-cpp//absl/log:absl_check", | |
| "@abseil-cpp//absl/log:check", | |
| "@abseil-cpp//absl/status", | |
| "@abseil-cpp//absl/status:status_macros", | |
| "@abseil-cpp//absl/status:status_matchers", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@abseil-cpp//absl/types:span", | |
| ], | |
| ) | |
| cc_library( | |
| name = "test_validation_tracker", | |
| hdrs = ["test_validation_tracker.h"], | |
| deps = [ | |
| "//constants:status_codes", | |
| "//proto:manifest_cc_proto", | |
| "//proto:validation_status_cc_proto", | |
| "//validator:tracker", | |
| "@abseil-cpp//absl/container:flat_hash_set", | |
| "@abseil-cpp//absl/strings", | |
| "@googletest//:gtest", | |
| "@protobuf//:protobuf_lite", | |
| ], | |
| ) | |
| cc_library( | |
| name = "test_status_tracker", | |
| hdrs = ["test_status_tracker.h"], | |
| deps = [ | |
| ":test_validation_tracker", | |
| "//constants:status_codes", | |
| "//utils:status_tracker", | |
| "//validator:tracker", | |
| ], | |
| ) | |
| cc_library( | |
| name = "proto_test_utils", | |
| hdrs = ["proto_test_utils.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/log:check", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@googletest//:gtest", | |
| "@protobuf", | |
| "@protobuf//:differencer", | |
| ], | |
| ) | |
| cc_library( | |
| name = "test_file_utils", | |
| srcs = ["test_file_utils.cc"], | |
| hdrs = ["test_file_utils.h"], | |
| deps = [ | |
| "@abseil-cpp//absl/status", | |
| "@abseil-cpp//absl/status:statusor", | |
| "@abseil-cpp//absl/strings:string_view", | |
| "@bazel_tools//tools/cpp/runfiles", | |
| "@riegeli//riegeli/bytes:cfile_reader", | |
| "@riegeli//riegeli/bytes:reader", | |
| ], | |
| ) |