| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/crypto.gni") | 5 import("//build/config/crypto.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 | 7 |
| 8 component("crypto") { | 8 component("crypto") { |
| 9 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. | 9 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. |
| 10 sources = [ | 10 sources = [ |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ":platform", | 168 ":platform", |
| 169 ":test_support", | 169 ":test_support", |
| 170 "//base", | 170 "//base", |
| 171 "//base/test:run_all_unittests", | 171 "//base/test:run_all_unittests", |
| 172 "//base/test:test_support", | 172 "//base/test:test_support", |
| 173 "//testing/gmock", | 173 "//testing/gmock", |
| 174 "//testing/gtest", | 174 "//testing/gtest", |
| 175 ] | 175 ] |
| 176 } | 176 } |
| 177 | 177 |
| 178 # This has no sources in some cases so can't be a static library. |
| 178 source_set("test_support") { | 179 source_set("test_support") { |
| 179 sources = [ | 180 testonly = true |
| 180 "scoped_test_nss_chromeos_user.cc", | 181 sources = [] |
| 181 "scoped_test_nss_chromeos_user.h", | |
| 182 "scoped_test_nss_db.cc", | |
| 183 "scoped_test_nss_db.h", | |
| 184 "scoped_test_system_nss_key_slot.cc", | |
| 185 "scoped_test_system_nss_key_slot.h", | |
| 186 ] | |
| 187 deps = [ | |
| 188 ":crypto", | |
| 189 ":platform", | |
| 190 "//base", | |
| 191 ] | |
| 192 | 182 |
| 193 if (!use_nss_certs) { | 183 if (use_nss_certs) { |
| 194 sources -= [ | 184 sources += [ |
| 195 "scoped_test_nss_db.cc", | 185 "scoped_test_nss_db.cc", |
| 196 "scoped_test_nss_db.h", | 186 "scoped_test_nss_db.h", |
| 197 ] | 187 ] |
| 198 } | 188 } |
| 199 | 189 |
| 200 if (!is_chromeos) { | 190 if (is_chromeos) { |
| 201 sources -= [ | 191 sources += [ |
| 202 "scoped_test_nss_chromeos_user.cc", | 192 "scoped_test_nss_chromeos_user.cc", |
| 203 "scoped_test_nss_chromeos_user.h", | 193 "scoped_test_nss_chromeos_user.h", |
| 204 "scoped_test_system_nss_key_slot.cc", | 194 "scoped_test_system_nss_key_slot.cc", |
| 205 "scoped_test_system_nss_key_slot.h", | 195 "scoped_test_system_nss_key_slot.h", |
| 206 ] | 196 ] |
| 207 } | 197 } |
| 198 |
| 199 deps = [ |
| 200 ":crypto", |
| 201 ":platform", |
| 202 "//base", |
| 203 ] |
| 208 } | 204 } |
| 209 | 205 |
| 210 config("platform_config") { | 206 config("platform_config") { |
| 211 if (use_nss_certs && is_clang) { | 207 if (use_nss_certs && is_clang) { |
| 212 # There is a broken header guard in /usr/include/nss/secmod.h: | 208 # There is a broken header guard in /usr/include/nss/secmod.h: |
| 213 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 | 209 # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 |
| 214 cflags = [ "-Wno-header-guard" ] | 210 cflags = [ "-Wno-header-guard" ] |
| 215 } | 211 } |
| 216 } | 212 } |
| 217 | 213 |
| 218 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, | 214 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, |
| 219 # according to the state of the crypto flags. A target just wanting to depend | 215 # according to the state of the crypto flags. A target just wanting to depend |
| 220 # on the current SSL library should just depend on this. | 216 # on the current SSL library should just depend on this. |
| 221 group("platform") { | 217 group("platform") { |
| 222 public_deps = [ | 218 public_deps = [ |
| 223 "//third_party/boringssl", | 219 "//third_party/boringssl", |
| 224 ] | 220 ] |
| 225 | 221 |
| 226 # Link in NSS if it is used for the platform certificate library | 222 # Link in NSS if it is used for the platform certificate library |
| 227 # (use_nss_certs). | 223 # (use_nss_certs). |
| 228 if (use_nss_certs) { | 224 if (use_nss_certs) { |
| 229 public_configs = [ ":platform_config" ] | 225 public_configs = [ ":platform_config" ] |
| 230 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] | 226 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] |
| 231 } | 227 } |
| 232 } | 228 } |
| OLD | NEW |