BUILD.gn 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # Copyright 2016 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//third_party/openscreen/src/build/config/cast.gni")
  5. config("certificate_config") {
  6. defines = []
  7. if (cast_allow_developer_certificate) {
  8. defines += [ "CAST_ALLOW_DEVELOPER_CERTIFICATE" ]
  9. }
  10. }
  11. source_set("cast_certificate_reader") {
  12. sources = [
  13. "cast_cert_reader.cc",
  14. "cast_cert_reader.h",
  15. ]
  16. deps = [
  17. "//base",
  18. "//net",
  19. ]
  20. }
  21. source_set("cast_certificate_roots") {
  22. sources = [
  23. "cast_root_ca_cert_der-inc.h",
  24. "eureka_root_ca_der-inc.h",
  25. ]
  26. }
  27. static_library("cast_certificate") {
  28. sources = [
  29. "cast_cert_validator.cc",
  30. "cast_cert_validator.h",
  31. "cast_crl.cc",
  32. "cast_crl.h",
  33. ]
  34. configs += [ ":certificate_config" ]
  35. deps = [
  36. ":cast_certificate_roots",
  37. "//base",
  38. "//net",
  39. "//third_party/boringssl",
  40. "//third_party/openscreen/src/cast/common/certificate/proto:certificate_proto",
  41. # Although we won't use the reader unless cast_allow_developer_certificate
  42. # is enabled, the buildfiles generation step requires the inclusion
  43. # anyway since it doesn't check preprocesser macros.
  44. ":cast_certificate_reader",
  45. ]
  46. if (cast_allow_developer_certificate) {
  47. sources += [
  48. "switches.cc",
  49. "switches.h",
  50. ]
  51. }
  52. }
  53. source_set("openscreen_certificate_verifier") {
  54. sources = [
  55. "net_parsed_certificate.cc",
  56. "net_parsed_certificate.h",
  57. "net_trust_store.cc",
  58. "net_trust_store.h",
  59. ]
  60. public_deps = [
  61. ":cast_certificate_roots",
  62. "//base",
  63. "//net",
  64. "//third_party/openscreen/src/cast/common:public",
  65. ]
  66. }
  67. static_library("test_support") {
  68. testonly = true
  69. sources = [
  70. "cast_cert_test_helpers.cc",
  71. "cast_cert_test_helpers.h",
  72. ]
  73. deps = [
  74. ":cast_certificate",
  75. ":cast_certificate_reader",
  76. "//base",
  77. "//net",
  78. "//testing/gtest",
  79. "//third_party/openscreen/src/cast/common/certificate/proto:certificate_unittest_proto",
  80. ]
  81. }
  82. source_set("unit_tests") {
  83. testonly = true
  84. sources = [
  85. "cast_cert_validator_unittest.cc",
  86. "cast_crl_unittest.cc",
  87. ]
  88. deps = [
  89. ":cast_certificate",
  90. ":cast_certificate_reader",
  91. ":test_support",
  92. "//base",
  93. "//base/test:test_support",
  94. "//net",
  95. "//testing/gtest",
  96. "//third_party/openscreen/src/cast/common/certificate/proto:certificate_unittest_proto",
  97. ]
  98. }