| # 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 = "status_codes", |
| srcs = ["status_codes.cc"], |
| hdrs = ["status_codes.h"], |
| deps = [ |
| "@abseil-cpp//absl/log", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings", |
| ], |
| ) |
| |
| cc_test( |
| name = "status_codes_test", |
| srcs = ["status_codes_test.cc"], |
| deps = [ |
| ":status_codes", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:status_matchers", |
| "@abseil-cpp//absl/strings", |
| "@googletest//:gtest_main", |
| ], |
| ) |
| |
| cc_library( |
| name = "verified_timestamp", |
| hdrs = ["verified_timestamp.h"], |
| deps = [ |
| "//crypto:algorithms", |
| "@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_library( |
| name = "parsed_timestamp_token", |
| hdrs = ["parsed_timestamp_token.h"], |
| deps = [ |
| "//crypto:algorithms", |
| "@abseil-cpp//absl/base:core_headers", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings:string_view", |
| ], |
| ) |
| |
| cc_library( |
| name = "cms_parser", |
| hdrs = ["cms_parser.h"], |
| deps = [ |
| ":parsed_timestamp_token", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings:string_view", |
| ], |
| ) |
| |
| cc_library( |
| name = "constants", |
| srcs = ["constants.cc"], |
| hdrs = ["constants.h"], |
| deps = [ |
| "@abseil-cpp//absl/log:die_if_null", |
| "@abseil-cpp//absl/strings:string_view", |
| "@boringssl//:crypto", |
| ], |
| ) |
| |
| cc_library( |
| name = "timestamp_parsing", |
| srcs = ["timestamp_parsing.cc"], |
| hdrs = ["timestamp_parsing.h"], |
| deps = [ |
| ":constants", |
| ":status_codes", |
| "//crypto:algorithms", |
| "//crypto:cbs_utils", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:status_macros", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings", |
| "@abseil-cpp//absl/strings:string_view", |
| "@abseil-cpp//absl/time", |
| "@boringssl//:crypto", |
| ], |
| ) |
| |
| cc_library( |
| name = "test_helpers", |
| srcs = ["test_helpers.cc"], |
| hdrs = ["test_helpers.h"], |
| deps = [ |
| ":constants", |
| ":status_codes", |
| "//crypto:algorithms", |
| "//crypto:cbs_utils", |
| "//crypto:hash", |
| "//crypto/default:hasher", |
| "//testing:boringssl_utils", |
| "//testing:cms", |
| "@abseil-cpp//absl/base:nullability", |
| "@abseil-cpp//absl/log", |
| "@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:statusor", |
| "@abseil-cpp//absl/strings:string_view", |
| "@abseil-cpp//absl/time", |
| "@abseil-cpp//absl/types:span", |
| "@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 = "timestamp_parsing_test", |
| srcs = ["timestamp_parsing_test.cc"], |
| data = [ |
| "//testing/testdata/keys/test_ca:certificates", |
| "//testing/testdata/keys/test_ca:keys", |
| ], |
| deps = [ |
| ":constants", |
| ":status_codes", |
| ":test_helpers", |
| ":timestamp_parsing", |
| "//crypto:algorithms", |
| "//crypto:cbs_utils", |
| "//testing:test_file_utils", |
| "@abseil-cpp//absl/base:no_destructor", |
| "@abseil-cpp//absl/log:check", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:status_matchers", |
| "@abseil-cpp//absl/strings", |
| "@abseil-cpp//absl/strings:string_view", |
| "@abseil-cpp//absl/time", |
| "@boringssl//:crypto", |
| "@googletest//:gtest_main", |
| ], |
| ) |
| |
| cc_library( |
| name = "timestamp_verifier", |
| srcs = ["timestamp_verifier.cc"], |
| hdrs = ["timestamp_verifier.h"], |
| deps = [ |
| ":parsed_timestamp_token", |
| ":timestamp_parsing", |
| ":verified_timestamp", |
| "//crypto:algorithms", |
| "//crypto:hash", |
| "//crypto/default:hasher", |
| "@abseil-cpp//absl/base:core_headers", |
| "@abseil-cpp//absl/base:nullability", |
| "@abseil-cpp//absl/log", |
| "@abseil-cpp//absl/log:absl_log", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:status_macros", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings", |
| "@abseil-cpp//absl/strings:string_view", |
| "@abseil-cpp//absl/time", |
| "@abseil-cpp//absl/types:span", |
| "@boringssl//:crypto", |
| "@boringssl//:pki", |
| ], |
| ) |
| |
| cc_test( |
| name = "timestamp_verifier_test", |
| srcs = ["timestamp_verifier_test.cc"], |
| deps = [ |
| ":constants", |
| ":parsed_timestamp_token", |
| ":test_helpers", |
| ":timestamp_verifier", |
| ":verified_timestamp", |
| "//crypto:algorithms", |
| "//crypto:cbs_utils", |
| "//crypto/default:trust_store", |
| "//proto:validation_result_cc_proto", |
| "@abseil-cpp//absl/algorithm:container", |
| "@abseil-cpp//absl/base:no_destructor", |
| "@abseil-cpp//absl/log:absl_check", |
| "@abseil-cpp//absl/log:check", |
| "@abseil-cpp//absl/status", |
| "@abseil-cpp//absl/status:status_matchers", |
| "@abseil-cpp//absl/status:statusor", |
| "@abseil-cpp//absl/strings:string_view", |
| "@abseil-cpp//absl/time", |
| "@abseil-cpp//absl/types:span", |
| "@boringssl//:crypto", |
| "@boringssl//:pki", |
| "@googletest//:gtest_main", |
| ], |
| ) |