blob: 37ee2cabacebf5b95d78681e3e9083d8b6b81998 [file] [edit]
# 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_visibility = ["//visibility:public"])
cc_library(
name = "algorithms",
srcs = ["algorithms.cc"],
hdrs = ["algorithms.h"],
deps = [
"@abseil-cpp//absl/log",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings",
"@abseil-cpp//absl/strings:string_view",
],
)
cc_test(
name = "algorithms_test",
srcs = ["algorithms_test.cc"],
deps = [
":algorithms",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:status_matchers",
"@abseil-cpp//absl/strings",
"@googletest//:gtest_main",
],
)
cc_library(
name = "hash",
hdrs = ["hash.h"],
deps = [
":algorithms",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings:string_view",
],
)
cc_library(
name = "cbs_utils",
hdrs = ["cbs_utils.h"],
deps = [
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings:string_view",
"@boringssl//:crypto",
],
)
cc_library(
name = "mock_hash",
testonly = True,
hdrs = ["mock_hash.h"],
deps = [
":algorithms",
":hash",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings:string_view",
"@googletest//:gtest",
],
)
cc_library(
name = "timestamp_read_handler",
hdrs = ["timestamp_read_handler.h"],
deps = [
"//tsp:verified_timestamp",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings:string_view",
],
)
cc_library(
name = "crypto_read_handler",
srcs = ["crypto_read_handler.cc"],
hdrs = ["crypto_read_handler.h"],
deps = [
":algorithms",
":timestamp_read_handler",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@abseil-cpp//absl/strings:string_view",
"@abseil-cpp//absl/time",
"@abseil-cpp//absl/types:span",
],
)
cc_test(
name = "crypto_read_handler_test",
srcs = ["crypto_read_handler_test.cc"],
deps = [
":crypto_read_handler",
"@abseil-cpp//absl/strings:string_view",
"@googletest//:gtest_main",
],
)