# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("certificate_reader") {
sources = [
"cast_cert_reader.cc",
"cast_cert_reader.h",
]
deps = [
"//base",
"//net",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
source_set("certificate_roots") {
sources = [
"cast_fallback_crl.h",
"cast_root_ca_cert_der-inc.h",
"eureka_root_ca_der-inc.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
static_library("certificate") {
sources = [
"cast_cert_printer.cc",
"cast_cert_printer.h",
"cast_cert_validator.cc",
"cast_cert_validator.h",
"cast_crl.cc",
"cast_crl.h",
"cast_trust_store.cc",
"cast_trust_store.h",
"switches.cc",
"switches.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":certificate_reader",
":certificate_roots",
"//base",
"//net",
"//third_party/boringssl",
"//third_party/openscreen/src/cast/common/certificate/proto:certificate_proto",
]
}
source_set("openscreen_certificate_verifier") {
sources = [
"net_parsed_certificate.cc",
"net_parsed_certificate.h",
"net_trust_store.cc",
"net_trust_store.h",
]
public_deps = [
":certificate_roots",
"//base",
"//net",
"//third_party/openscreen/src/cast/common:public",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
static_library("test_support") {
testonly = true
sources = [
"cast_cert_test_helpers.cc",
"cast_cert_test_helpers.h",
]
deps = [
":certificate",
":certificate_reader",
"//base",
"//net",
"//testing/gtest",
"//third_party/openscreen/src/cast/common/certificate/proto:certificate_unittest_proto",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"cast_cert_validator_unittest.cc",
"cast_crl_unittest.cc",
]
deps = [
":certificate",
":certificate_reader",
":test_support",
"//base",
"//base/test:test_support",
"//net",
"//testing/gtest",
"//third_party/openscreen/src/cast/common/certificate/proto:certificate_unittest_proto",
]
}