Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: crypto/BUILD.gn

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the wireformat to use int32_t for HANDLE. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ipc/BUILD.gn » ('j') | ipc/brokerable_attachment.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 if (is_nacl) {
9 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. 9 component("crypto") {
10 sources = [ 10 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
erikchen 2015/06/23 22:37:00 I was wondering whether this needed to have a diff
11 "aead_openssl.cc", 11 sources = [
12 "aead_openssl.h", 12 "random.cc",
agl 2015/06/24 01:28:57 This source list seems to be substantially differe
erikchen 2015/06/24 17:50:25 Not without a lot more changes. crypto_nacl.gyp de
13 "apple_keychain.h", 13 "random.h",
14 "apple_keychain_ios.mm", 14 ]
15 "apple_keychain_mac.mm", 15 deps = [
16 "capi_util.cc", 16 "//base",
17 "capi_util.h", 17 ]
18 "crypto_export.h", 18 }
19 "cssm_init.cc", 19 } else {
20 "cssm_init.h", 20 component("crypto") {
21 "curve25519-donna.c", 21 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
22 "curve25519.cc", 22 sources = [
23 "curve25519.h", 23 "aead_openssl.cc",
24 "ec_private_key.h", 24 "aead_openssl.h",
25 "ec_private_key_nss.cc",
26 "ec_private_key_openssl.cc",
27 "ec_signature_creator.cc",
28 "ec_signature_creator.h",
29 "ec_signature_creator_impl.h",
30 "ec_signature_creator_nss.cc",
31 "ec_signature_creator_openssl.cc",
32 "encryptor.cc",
33 "encryptor.h",
34 "encryptor_nss.cc",
35 "encryptor_openssl.cc",
36 "ghash.cc",
37 "ghash.h",
38 "hkdf.cc",
39 "hkdf.h",
40 "hmac.cc",
41 "hmac.h",
42 "hmac_nss.cc",
43 "hmac_openssl.cc",
44 "mac_security_services_lock.cc",
45 "mac_security_services_lock.h",
46
47 # TODO(brettw) these mocks should be moved to a test_support_crypto target
48 # if possible.
49 "mock_apple_keychain.cc",
50 "mock_apple_keychain.h",
51 "mock_apple_keychain_ios.cc",
52 "mock_apple_keychain_mac.cc",
53 "nss_key_util.cc",
54 "nss_key_util.h",
55 "nss_util.cc",
56 "nss_util.h",
57 "nss_util_internal.h",
58 "openssl_bio_string.cc",
59 "openssl_bio_string.h",
60 "openssl_util.cc",
61 "openssl_util.h",
62 "p224.cc",
63 "p224.h",
64 "p224_spake.cc",
65 "p224_spake.h",
66 "random.cc",
67 "random.h",
68 "rsa_private_key.cc",
69 "rsa_private_key.h",
70 "rsa_private_key_nss.cc",
71 "rsa_private_key_openssl.cc",
72 "scoped_capi_types.h",
73 "scoped_nss_types.h",
74 "secure_hash.h",
75 "secure_hash_default.cc",
76 "secure_hash_openssl.cc",
77 "secure_util.cc",
78 "secure_util.h",
79 "sha2.cc",
80 "sha2.h",
81 "signature_creator.h",
82 "signature_creator_nss.cc",
83 "signature_creator_openssl.cc",
84 "signature_verifier.h",
85 "signature_verifier_nss.cc",
86 "signature_verifier_openssl.cc",
87 "symmetric_key.h",
88 "symmetric_key_nss.cc",
89 "symmetric_key_openssl.cc",
90 "third_party/nss/chromium-blapi.h",
91 "third_party/nss/chromium-blapit.h",
92 "third_party/nss/chromium-nss.h",
93 "third_party/nss/chromium-sha256.h",
94 "third_party/nss/pk11akey.cc",
95 "third_party/nss/rsawrapr.c",
96 "third_party/nss/secsign.cc",
97 "third_party/nss/sha512.cc",
98 ]
99
100 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
101 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
102
103 deps = [
104 ":platform",
105 "//base",
106 "//base/third_party/dynamic_annotations",
107 ]
108
109 if (!is_mac && !is_ios) {
110 sources -= [
111 "apple_keychain.h", 25 "apple_keychain.h",
26 "apple_keychain_ios.mm",
27 "apple_keychain_mac.mm",
28 "capi_util.cc",
29 "capi_util.h",
30 "crypto_export.h",
31 "cssm_init.cc",
32 "cssm_init.h",
33 "curve25519-donna.c",
34 "curve25519.cc",
35 "curve25519.h",
36 "ec_private_key.h",
37 "ec_private_key_nss.cc",
38 "ec_private_key_openssl.cc",
39 "ec_signature_creator.cc",
40 "ec_signature_creator.h",
41 "ec_signature_creator_impl.h",
42 "ec_signature_creator_nss.cc",
43 "ec_signature_creator_openssl.cc",
44 "encryptor.cc",
45 "encryptor.h",
46 "encryptor_nss.cc",
47 "encryptor_openssl.cc",
48 "ghash.cc",
49 "ghash.h",
50 "hkdf.cc",
51 "hkdf.h",
52 "hmac.cc",
53 "hmac.h",
54 "hmac_nss.cc",
55 "hmac_openssl.cc",
56 "mac_security_services_lock.cc",
57 "mac_security_services_lock.h",
58
59 # TODO(brettw) these mocks should be moved to a test_support_crypto target
60 # if possible.
112 "mock_apple_keychain.cc", 61 "mock_apple_keychain.cc",
113 "mock_apple_keychain.h", 62 "mock_apple_keychain.h",
114 ] 63 "mock_apple_keychain_ios.cc",
115 } 64 "mock_apple_keychain_mac.cc",
116
117 if (!is_mac) {
118 sources -= [
119 "cssm_init.cc",
120 "cssm_init.h",
121 "mac_security_services_lock.cc",
122 "mac_security_services_lock.h",
123 ]
124 }
125 if (!is_win) {
126 sources -= [
127 "capi_util.cc",
128 "capi_util.h",
129 ]
130 }
131
132 if (is_android) {
133 deps += [ "//third_party/android_tools:cpu_features" ]
134 }
135
136 if (use_openssl) {
137 # Remove NSS files when using OpenSSL
138 sources -= [
139 "ec_private_key_nss.cc",
140 "ec_signature_creator_nss.cc",
141 "encryptor_nss.cc",
142 "hmac_nss.cc",
143 "rsa_private_key_nss.cc",
144 "secure_hash_default.cc",
145 "signature_creator_nss.cc",
146 "signature_verifier_nss.cc",
147 "symmetric_key_nss.cc",
148 "third_party/nss/chromium-blapi.h",
149 "third_party/nss/chromium-blapit.h",
150 "third_party/nss/chromium-nss.h",
151 "third_party/nss/pk11akey.cc",
152 "third_party/nss/rsawrapr.c",
153 "third_party/nss/secsign.cc",
154 ]
155 } else {
156 # Remove OpenSSL when using NSS.
157 sources -= [
158 "aead_openssl.cc",
159 "aead_openssl.h",
160 "ec_private_key_openssl.cc",
161 "ec_signature_creator_openssl.cc",
162 "encryptor_openssl.cc",
163 "hmac_openssl.cc",
164 "openssl_bio_string.cc",
165 "openssl_bio_string.h",
166 "openssl_util.cc",
167 "openssl_util.h",
168 "rsa_private_key_openssl.cc",
169 "secure_hash_openssl.cc",
170 "signature_creator_openssl.cc",
171 "signature_verifier_openssl.cc",
172 "symmetric_key_openssl.cc",
173 ]
174 }
175
176 # Some files are built when NSS is used at all, either for the internal crypto
177 # library or the platform certificate library.
178 if (use_openssl && !use_nss_certs) {
179 sources -= [
180 "nss_key_util.cc", 65 "nss_key_util.cc",
181 "nss_key_util.h", 66 "nss_key_util.h",
182 "nss_util.cc", 67 "nss_util.cc",
183 "nss_util.h", 68 "nss_util.h",
184 "nss_util_internal.h", 69 "nss_util_internal.h",
185 ] 70 "openssl_bio_string.cc",
71 "openssl_bio_string.h",
72 "openssl_util.cc",
73 "openssl_util.h",
74 "p224.cc",
75 "p224.h",
76 "p224_spake.cc",
77 "p224_spake.h",
78 "random.cc",
79 "random.h",
80 "rsa_private_key.cc",
81 "rsa_private_key.h",
82 "rsa_private_key_nss.cc",
83 "rsa_private_key_openssl.cc",
84 "scoped_capi_types.h",
85 "scoped_nss_types.h",
86 "secure_hash.h",
87 "secure_hash_default.cc",
88 "secure_hash_openssl.cc",
89 "secure_util.cc",
90 "secure_util.h",
91 "sha2.cc",
92 "sha2.h",
93 "signature_creator.h",
94 "signature_creator_nss.cc",
95 "signature_creator_openssl.cc",
96 "signature_verifier.h",
97 "signature_verifier_nss.cc",
98 "signature_verifier_openssl.cc",
99 "symmetric_key.h",
100 "symmetric_key_nss.cc",
101 "symmetric_key_openssl.cc",
102 "third_party/nss/chromium-blapi.h",
103 "third_party/nss/chromium-blapit.h",
104 "third_party/nss/chromium-nss.h",
105 "third_party/nss/chromium-sha256.h",
106 "third_party/nss/pk11akey.cc",
107 "third_party/nss/rsawrapr.c",
108 "third_party/nss/secsign.cc",
109 "third_party/nss/sha512.cc",
110 ]
111
112 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
113 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
114
115 deps = [
116 ":platform",
117 "//base",
118 "//base/third_party/dynamic_annotations",
119 ]
120
121 if (!is_mac && !is_ios) {
122 sources -= [
123 "apple_keychain.h",
124 "mock_apple_keychain.cc",
125 "mock_apple_keychain.h",
126 ]
127 }
128
129 if (!is_mac) {
130 sources -= [
131 "cssm_init.cc",
132 "cssm_init.h",
133 "mac_security_services_lock.cc",
134 "mac_security_services_lock.h",
135 ]
136 }
137 if (!is_win) {
138 sources -= [
139 "capi_util.cc",
140 "capi_util.h",
141 ]
142 }
143
144 if (is_android) {
145 deps += [ "//third_party/android_tools:cpu_features" ]
146 }
147
148 if (use_openssl) {
149 # Remove NSS files when using OpenSSL
150 sources -= [
151 "ec_private_key_nss.cc",
152 "ec_signature_creator_nss.cc",
153 "encryptor_nss.cc",
154 "hmac_nss.cc",
155 "rsa_private_key_nss.cc",
156 "secure_hash_default.cc",
157 "signature_creator_nss.cc",
158 "signature_verifier_nss.cc",
159 "symmetric_key_nss.cc",
160 "third_party/nss/chromium-blapi.h",
161 "third_party/nss/chromium-blapit.h",
162 "third_party/nss/chromium-nss.h",
163 "third_party/nss/pk11akey.cc",
164 "third_party/nss/rsawrapr.c",
165 "third_party/nss/secsign.cc",
166 ]
167 } else {
168 # Remove OpenSSL when using NSS.
169 sources -= [
170 "aead_openssl.cc",
171 "aead_openssl.h",
172 "ec_private_key_openssl.cc",
173 "ec_signature_creator_openssl.cc",
174 "encryptor_openssl.cc",
175 "hmac_openssl.cc",
176 "openssl_bio_string.cc",
177 "openssl_bio_string.h",
178 "openssl_util.cc",
179 "openssl_util.h",
180 "rsa_private_key_openssl.cc",
181 "secure_hash_openssl.cc",
182 "signature_creator_openssl.cc",
183 "signature_verifier_openssl.cc",
184 "symmetric_key_openssl.cc",
185 ]
186 }
187
188 # Some files are built when NSS is used at all, either for the internal cryp to
189 # library or the platform certificate library.
190 if (use_openssl && !use_nss_certs) {
191 sources -= [
192 "nss_key_util.cc",
193 "nss_key_util.h",
194 "nss_util.cc",
195 "nss_util.h",
196 "nss_util_internal.h",
197 ]
198 }
199
200 defines = [ "CRYPTO_IMPLEMENTATION" ]
186 } 201 }
187
188 defines = [ "CRYPTO_IMPLEMENTATION" ]
189 } 202 }
190 203
191 # TODO(GYP): TODO(dpranke), fix the compile errors for this stuff 204 # TODO(GYP): TODO(dpranke), fix the compile errors for this stuff
192 # and make it work. 205 # and make it work.
193 if (false && is_win) { 206 if (false && is_win) {
194 # A minimal crypto subset for hmac-related stuff that small standalone 207 # A minimal crypto subset for hmac-related stuff that small standalone
195 # targets can use to reduce code size on Windows. This does not depend on 208 # targets can use to reduce code size on Windows. This does not depend on
196 # OpenSSL/NSS but will use Windows APIs for that functionality. 209 # OpenSSL/NSS but will use Windows APIs for that functionality.
197 source_set("crypto_minimal_win") { 210 source_set("crypto_minimal_win") {
198 sources = [ 211 sources = [
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] 358 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
346 } else { 359 } else {
347 # Non-Linux platforms use the hermetic NSS from the tree. 360 # Non-Linux platforms use the hermetic NSS from the tree.
348 deps += [ 361 deps += [
349 "//third_party/nss:nspr", 362 "//third_party/nss:nspr",
350 "//third_party/nss:nss", 363 "//third_party/nss:nss",
351 ] 364 ]
352 } 365 }
353 } 366 }
354 } 367 }
OLDNEW
« no previous file with comments | « no previous file | ipc/BUILD.gn » ('j') | ipc/brokerable_attachment.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698