OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//build/config/linux/pkg_config.gni") | |
6 | |
7 if (is_linux) { | |
8 # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL | |
9 # library but the system NSS libraries. Non-Linux platforms using NSS use the | |
10 # hermetic one in //third_party/nss. | |
11 # | |
12 # Generally you should depend on //crypto:platform instead of using this | |
13 # config since that will properly pick up NSS or OpenSSL depending on | |
14 # platform and build config. | |
15 pkg_config("system_nss_no_ssl_config") { | |
16 packages = [ "nss" ] | |
17 extra_args = [ "-v", "-lssl3" ] | |
18 } | |
19 } else { | |
20 include_nss_root_certs = is_ios | |
21 include_nss_libpkix = is_ios | |
22 | |
23 config("nspr_config") { | |
24 defines = [ "NO_NSPR_10_SUPPORT" ] | |
25 include_dirs = [ | |
26 "nspr/pr/include", | |
27 "nspr/lib/ds", | |
28 "nspr/lib/libc/include", | |
29 ] | |
30 | |
31 if (component_mode != "shared_library") { | |
32 defines += [ "NSPR_STATIC" ] | |
33 } | |
34 } | |
35 | |
36 component("nspr") { | |
37 output_name = "crnspr" | |
38 sources = [ | |
39 "nspr/lib/ds/plarena.c", | |
40 "nspr/lib/ds/plarena.h", | |
41 "nspr/lib/ds/plarenas.h", | |
42 "nspr/lib/ds/plhash.c", | |
43 "nspr/lib/ds/plhash.h", | |
44 "nspr/lib/libc/include/plbase64.h", | |
45 "nspr/lib/libc/include/plerror.h", | |
46 "nspr/lib/libc/include/plgetopt.h", | |
47 "nspr/lib/libc/include/plstr.h", | |
48 "nspr/lib/libc/src/base64.c", | |
49 "nspr/lib/libc/src/plerror.c", | |
50 "nspr/lib/libc/src/plgetopt.c", | |
51 "nspr/lib/libc/src/strcase.c", | |
52 "nspr/lib/libc/src/strcat.c", | |
53 "nspr/lib/libc/src/strchr.c", | |
54 "nspr/lib/libc/src/strcmp.c", | |
55 "nspr/lib/libc/src/strcpy.c", | |
56 "nspr/lib/libc/src/strdup.c", | |
57 "nspr/lib/libc/src/strlen.c", | |
58 "nspr/lib/libc/src/strpbrk.c", | |
59 "nspr/lib/libc/src/strstr.c", | |
60 "nspr/lib/libc/src/strtok.c", | |
61 "nspr/pr/include/md/prosdep.h", | |
62 "nspr/pr/include/md/_darwin.cfg", | |
63 "nspr/pr/include/md/_darwin.h", | |
64 "nspr/pr/include/md/_pcos.h", | |
65 "nspr/pr/include/md/_pth.h", | |
66 "nspr/pr/include/md/_unixos.h", | |
67 "nspr/pr/include/md/_unix_errors.h", | |
68 "nspr/pr/include/md/_win32_errors.h", | |
69 "nspr/pr/include/md/_win95.cfg", | |
70 "nspr/pr/include/md/_win95.h", | |
71 "nspr/pr/include/nspr.h", | |
72 "nspr/pr/include/obsolete/pralarm.h", | |
73 "nspr/pr/include/obsolete/probslet.h", | |
74 "nspr/pr/include/obsolete/protypes.h", | |
75 "nspr/pr/include/obsolete/prsem.h", | |
76 "nspr/pr/include/pratom.h", | |
77 "nspr/pr/include/prbit.h", | |
78 "nspr/pr/include/prclist.h", | |
79 "nspr/pr/include/prcmon.h", | |
80 "nspr/pr/include/prcountr.h", | |
81 "nspr/pr/include/prcpucfg.h", | |
82 "nspr/pr/include/prcvar.h", | |
83 "nspr/pr/include/prdtoa.h", | |
84 "nspr/pr/include/prenv.h", | |
85 "nspr/pr/include/prerr.h", | |
86 "nspr/pr/include/prerror.h", | |
87 "nspr/pr/include/prinet.h", | |
88 "nspr/pr/include/prinit.h", | |
89 "nspr/pr/include/prinrval.h", | |
90 "nspr/pr/include/prio.h", | |
91 "nspr/pr/include/pripcsem.h", | |
92 "nspr/pr/include/private/pprio.h", | |
93 "nspr/pr/include/private/pprmwait.h", | |
94 "nspr/pr/include/private/pprthred.h", | |
95 "nspr/pr/include/private/primpl.h", | |
96 "nspr/pr/include/private/prpriv.h", | |
97 "nspr/pr/include/prlink.h", | |
98 "nspr/pr/include/prlock.h", | |
99 "nspr/pr/include/prlog.h", | |
100 "nspr/pr/include/prlong.h", | |
101 "nspr/pr/include/prmem.h", | |
102 "nspr/pr/include/prmon.h", | |
103 "nspr/pr/include/prmwait.h", | |
104 "nspr/pr/include/prnetdb.h", | |
105 "nspr/pr/include/prolock.h", | |
106 "nspr/pr/include/prpdce.h", | |
107 "nspr/pr/include/prprf.h", | |
108 "nspr/pr/include/prproces.h", | |
109 "nspr/pr/include/prrng.h", | |
110 "nspr/pr/include/prrwlock.h", | |
111 "nspr/pr/include/prshm.h", | |
112 "nspr/pr/include/prshma.h", | |
113 "nspr/pr/include/prsystem.h", | |
114 "nspr/pr/include/prthread.h", | |
115 "nspr/pr/include/prtime.h", | |
116 "nspr/pr/include/prtpool.h", | |
117 "nspr/pr/include/prtrace.h", | |
118 "nspr/pr/include/prtypes.h", | |
119 "nspr/pr/include/prvrsion.h", | |
120 "nspr/pr/include/prwin16.h", | |
121 "nspr/pr/src/io/prdir.c", | |
122 "nspr/pr/src/io/prfdcach.c", | |
123 "nspr/pr/src/io/prfile.c", | |
124 "nspr/pr/src/io/prio.c", | |
125 "nspr/pr/src/io/priometh.c", | |
126 "nspr/pr/src/io/pripv6.c", | |
127 "nspr/pr/src/io/prlayer.c", | |
128 "nspr/pr/src/io/prlog.c", | |
129 "nspr/pr/src/io/prmapopt.c", | |
130 "nspr/pr/src/io/prmmap.c", | |
131 "nspr/pr/src/io/prmwait.c", | |
132 "nspr/pr/src/io/prpolevt.c", | |
133 "nspr/pr/src/io/prprf.c", | |
134 "nspr/pr/src/io/prscanf.c", | |
135 "nspr/pr/src/io/prsocket.c", | |
136 "nspr/pr/src/io/prstdio.c", | |
137 "nspr/pr/src/linking/prlink.c", | |
138 "nspr/pr/src/malloc/prmalloc.c", | |
139 "nspr/pr/src/malloc/prmem.c", | |
140 "nspr/pr/src/md/prosdep.c", | |
141 "nspr/pr/src/md/unix/darwin.c", | |
142 "nspr/pr/src/md/unix/os_Darwin.s", | |
143 "nspr/pr/src/md/unix/unix.c", | |
144 "nspr/pr/src/md/unix/unix_errors.c", | |
145 "nspr/pr/src/md/unix/uxproces.c", | |
146 "nspr/pr/src/md/unix/uxrng.c", | |
147 "nspr/pr/src/md/unix/uxshm.c", | |
148 "nspr/pr/src/md/unix/uxwrap.c", | |
149 "nspr/pr/src/md/windows/ntgc.c", | |
150 "nspr/pr/src/md/windows/ntinrval.c", | |
151 "nspr/pr/src/md/windows/ntmisc.c", | |
152 "nspr/pr/src/md/windows/ntsec.c", | |
153 "nspr/pr/src/md/windows/ntsem.c", | |
154 "nspr/pr/src/md/windows/w32ipcsem.c", | |
155 "nspr/pr/src/md/windows/w32poll.c", | |
156 "nspr/pr/src/md/windows/w32rng.c", | |
157 "nspr/pr/src/md/windows/w32shm.c", | |
158 "nspr/pr/src/md/windows/w95cv.c", | |
159 "nspr/pr/src/md/windows/w95dllmain.c", | |
160 "nspr/pr/src/md/windows/w95io.c", | |
161 "nspr/pr/src/md/windows/w95sock.c", | |
162 "nspr/pr/src/md/windows/w95thred.c", | |
163 "nspr/pr/src/md/windows/win32_errors.c", | |
164 "nspr/pr/src/memory/prseg.c", | |
165 "nspr/pr/src/memory/prshm.c", | |
166 "nspr/pr/src/memory/prshma.c", | |
167 "nspr/pr/src/misc/pralarm.c", | |
168 "nspr/pr/src/misc/pratom.c", | |
169 "nspr/pr/src/misc/praton.c", | |
170 "nspr/pr/src/misc/prcountr.c", | |
171 "nspr/pr/src/misc/prdtoa.c", | |
172 "nspr/pr/src/misc/prenv.c", | |
173 "nspr/pr/src/misc/prerr.c", | |
174 "nspr/pr/src/misc/prerror.c", | |
175 "nspr/pr/src/misc/prerrortable.c", | |
176 "nspr/pr/src/misc/prinit.c", | |
177 "nspr/pr/src/misc/prinrval.c", | |
178 "nspr/pr/src/misc/pripc.c", | |
179 "nspr/pr/src/misc/pripcsem.c", | |
180 "nspr/pr/src/misc/prlog2.c", | |
181 "nspr/pr/src/misc/prlong.c", | |
182 "nspr/pr/src/misc/prnetdb.c", | |
183 "nspr/pr/src/misc/prolock.c", | |
184 "nspr/pr/src/misc/prrng.c", | |
185 "nspr/pr/src/misc/prsystem.c", | |
186 "nspr/pr/src/misc/prthinfo.c", | |
187 "nspr/pr/src/misc/prtime.c", | |
188 "nspr/pr/src/misc/prtpool.c", | |
189 "nspr/pr/src/misc/prtrace.c", | |
190 "nspr/pr/src/pthreads/ptio.c", | |
191 "nspr/pr/src/pthreads/ptmisc.c", | |
192 "nspr/pr/src/pthreads/ptsynch.c", | |
193 "nspr/pr/src/pthreads/ptthread.c", | |
194 "nspr/pr/src/threads/combined/prucpu.c", | |
195 "nspr/pr/src/threads/combined/prucv.c", | |
196 "nspr/pr/src/threads/combined/prulock.c", | |
197 "nspr/pr/src/threads/combined/prustack.c", | |
198 "nspr/pr/src/threads/combined/pruthr.c", | |
199 "nspr/pr/src/threads/prcmon.c", | |
200 "nspr/pr/src/threads/prcthr.c", | |
201 "nspr/pr/src/threads/prdump.c", | |
202 "nspr/pr/src/threads/prmon.c", | |
203 "nspr/pr/src/threads/prrwlock.c", | |
204 "nspr/pr/src/threads/prsem.c", | |
205 "nspr/pr/src/threads/prtpd.c", | |
206 ] | |
207 | |
208 direct_dependent_configs = [ ":nspr_config" ] | |
209 | |
210 configs -= [ | |
211 "//build/config/compiler:chromium_code", | |
212 ] | |
213 if (is_win) { | |
214 configs -= [ | |
215 "//build/config/win:unicode", # Requires 8-bit mode. | |
216 "//build/config/win:lean_and_mean", # Won"t compile with lean and mean. | |
217 ] | |
218 } | |
219 configs += [ "//build/config/compiler:no_chromium_code" ] | |
220 | |
221 cflags = [] | |
222 defines = [ | |
223 "_NSPR_BUILD", | |
224 "FORCE_PR_LOG", | |
225 ] | |
226 | |
227 include_dirs = [ | |
228 "nspr/pr/include/private", | |
229 ] | |
230 | |
231 if (is_win) { | |
232 cflags = [ | |
233 "/wd4554", # Check precidence. | |
234 "/wd4267", # Conversion from size_t to "type". | |
235 ] | |
236 defines += [ | |
237 "XP_PC", | |
238 "WIN32", | |
239 "WIN95", | |
240 "_PR_GLOBAL_THREADS_ONLY", | |
241 "_CRT_SECURE_NO_WARNINGS", | |
242 ] | |
243 } else { | |
244 sources -= [ | |
245 "nspr/pr/src/md/windows/ntgc.c", | |
246 "nspr/pr/src/md/windows/ntinrval.c", | |
247 "nspr/pr/src/md/windows/ntmisc.c", | |
248 "nspr/pr/src/md/windows/ntsec.c", | |
249 "nspr/pr/src/md/windows/ntsem.c", | |
250 "nspr/pr/src/md/windows/w32ipcsem.c", | |
251 "nspr/pr/src/md/windows/w32poll.c", | |
252 "nspr/pr/src/md/windows/w32rng.c", | |
253 "nspr/pr/src/md/windows/w32shm.c", | |
254 "nspr/pr/src/md/windows/w95cv.c", | |
255 "nspr/pr/src/md/windows/w95dllmain.c", | |
256 "nspr/pr/src/md/windows/w95io.c", | |
257 "nspr/pr/src/md/windows/w95sock.c", | |
258 "nspr/pr/src/md/windows/w95thred.c", | |
259 "nspr/pr/src/md/windows/win32_errors.c", | |
260 "nspr/pr/src/threads/combined/prucpu.c", | |
261 "nspr/pr/src/threads/combined/prucv.c", | |
262 "nspr/pr/src/threads/combined/prulock.c", | |
263 "nspr/pr/src/threads/combined/prustack.c", | |
264 "nspr/pr/src/threads/combined/pruthr.c", | |
265 ] | |
266 } | |
267 | |
268 if (!is_posix) { | |
269 sources -= [ | |
270 "nspr/pr/src/md/unix/darwin.c", | |
271 "nspr/pr/src/md/unix/os_Darwin.s", | |
272 "nspr/pr/src/md/unix/unix.c", | |
273 "nspr/pr/src/md/unix/unix_errors.c", | |
274 "nspr/pr/src/md/unix/uxproces.c", | |
275 "nspr/pr/src/md/unix/uxrng.c", | |
276 "nspr/pr/src/md/unix/uxshm.c", | |
277 "nspr/pr/src/md/unix/uxwrap.c", | |
278 "nspr/pr/src/pthreads/ptio.c", | |
279 "nspr/pr/src/pthreads/ptmisc.c", | |
280 "nspr/pr/src/pthreads/ptsynch.c", | |
281 "nspr/pr/src/pthreads/ptthread.c", | |
282 ] | |
283 } | |
284 | |
285 if (cpu_arch == "x86") { | |
286 defines += [ "_X86_" ] | |
287 } else if (cpu_arch == "x64") { | |
288 defines += [ "_AMD64_" ] | |
289 } | |
290 | |
291 if (is_mac || is_ios) { | |
292 sources -= [ | |
293 "nspr/pr/src/io/prdir.c", | |
294 "nspr/pr/src/io/prfile.c", | |
295 "nspr/pr/src/io/prio.c", | |
296 "nspr/pr/src/io/prsocket.c", | |
297 "nspr/pr/src/misc/pripcsem.c", | |
298 "nspr/pr/src/threads/prcthr.c", | |
299 "nspr/pr/src/threads/prdump.c", | |
300 "nspr/pr/src/threads/prmon.c", | |
301 "nspr/pr/src/threads/prsem.c", | |
302 ] | |
303 defines += [ | |
304 "XP_UNIX", | |
305 "DARWIN", | |
306 "XP_MACOSX", | |
307 "_PR_PTHREADS", | |
308 "HAVE_BSD_FLOCK", | |
309 "HAVE_DLADDR", | |
310 "HAVE_LCHOWN", | |
311 "HAVE_SOCKLEN_T", | |
312 "HAVE_STRERROR", | |
313 ] | |
314 } | |
315 | |
316 if (is_mac) { | |
317 defines += [ | |
318 "HAVE_CRT_EXTERNS_H", | |
319 ] | |
320 libs = [ | |
321 "CoreFoundation.framework", | |
322 "CoreServices.framework", | |
323 ] | |
324 } | |
325 | |
326 if (is_clang) { | |
327 cflags += [ | |
328 # nspr uses a bunch of deprecated functions (NSLinkModule etc) in | |
329 # prlink.c on mac. | |
330 "-Wno-deprecated-declarations", | |
331 # nspr passes "const char*" through "void*". | |
332 "-Wno-incompatible-pointer-types", | |
333 # nspr passes "int*" through "unsigned int*". | |
334 "-Wno-pointer-sign", | |
335 | |
336 "-Wno-incompatible-pointer-types", | |
337 "-Wno-pointer-sign", | |
338 ] | |
339 } | |
340 } | |
341 | |
342 component("nss") { | |
343 output_name = "crnss" | |
344 sources = [ | |
345 # Ensure at least one object file is produced, so that MSVC does not | |
346 # warn when creating the static/shared library. See the note for | |
347 # the "nssckbi" target for why the "nss" target was split as such. | |
348 "nss/lib/nss/nssver.c", | |
349 ] | |
350 | |
351 deps = [ ":nss_static" ] | |
352 | |
353 if (include_nss_root_certs) { | |
354 deps += [ ":nssckbi" ] | |
355 } | |
356 | |
357 if (component_mode == "shared_library") { | |
358 if (is_mac) { | |
359 ldflags = [ "-all_load" ] | |
360 } else if (is_win) { | |
361 # Pass the def file to the linker. | |
362 ldflags = [ rebase_path("nss/exports_win.def", root_build_dir) ] | |
363 } | |
364 } | |
365 | |
366 forward_dependent_configs_from = deps | |
367 } | |
368 | |
369 config("nssckbi_config") { | |
370 include_dirs = [ "nss/lib/ckfw/builtins" ] | |
371 } | |
372 | |
373 # This is really more of a pseudo-target to work around the fact that | |
374 # a single static_library target cannot contain two object files of the | |
375 # same name (hash.o / hash.obj). Logically, this is part of the | |
376 # "nss_static" target. By separating it out, it creates a possible | |
377 # circular dependency between "nss_static" and "nssckbi" when | |
378 # "exclude_nss_root_certs" is not specified, as "nss_static" depends on | |
379 # the "builtinsC_GetFunctionList" exported by this target. This is an | |
380 # artifact of how NSS is being statically built, which is not an | |
381 # officially supported configuration - normally, "nssckbi.dll/so" would | |
382 # depend on libnss3.dll/so, and the higher layer caller would instruct | |
383 # libnss3.dll to dynamically load nssckbi.dll, breaking the circle. | |
384 # | |
385 # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency | |
386 # without requiring nssckbi to be built as a shared library. | |
387 source_set("nssckbi") { | |
388 visibility = ":nss" # This target is internal implementation detail. | |
389 | |
390 sources = [ | |
391 "nss/lib/ckfw/builtins/anchor.c", | |
392 "nss/lib/ckfw/builtins/bfind.c", | |
393 "nss/lib/ckfw/builtins/binst.c", | |
394 "nss/lib/ckfw/builtins/bobject.c", | |
395 "nss/lib/ckfw/builtins/bsession.c", | |
396 "nss/lib/ckfw/builtins/bslot.c", | |
397 "nss/lib/ckfw/builtins/btoken.c", | |
398 "nss/lib/ckfw/builtins/builtins.h", | |
399 "nss/lib/ckfw/builtins/certdata.c", | |
400 "nss/lib/ckfw/builtins/ckbiver.c", | |
401 "nss/lib/ckfw/builtins/constants.c", | |
402 "nss/lib/ckfw/builtins/nssckbi.h", | |
403 "nss/lib/ckfw/ck.h", | |
404 "nss/lib/ckfw/ckfw.h", | |
405 "nss/lib/ckfw/ckfwm.h", | |
406 "nss/lib/ckfw/ckfwtm.h", | |
407 "nss/lib/ckfw/ckmd.h", | |
408 "nss/lib/ckfw/ckt.h", | |
409 "nss/lib/ckfw/crypto.c", | |
410 "nss/lib/ckfw/find.c", | |
411 "nss/lib/ckfw/hash.c", | |
412 "nss/lib/ckfw/instance.c", | |
413 "nss/lib/ckfw/mechanism.c", | |
414 "nss/lib/ckfw/mutex.c", | |
415 "nss/lib/ckfw/nssck.api", | |
416 "nss/lib/ckfw/nssckepv.h", | |
417 "nss/lib/ckfw/nssckft.h", | |
418 "nss/lib/ckfw/nssckfw.h", | |
419 "nss/lib/ckfw/nssckfwc.h", | |
420 "nss/lib/ckfw/nssckfwt.h", | |
421 "nss/lib/ckfw/nssckg.h", | |
422 "nss/lib/ckfw/nssckmdt.h", | |
423 "nss/lib/ckfw/nssckt.h", | |
424 "nss/lib/ckfw/object.c", | |
425 "nss/lib/ckfw/session.c", | |
426 "nss/lib/ckfw/sessobj.c", | |
427 "nss/lib/ckfw/slot.c", | |
428 "nss/lib/ckfw/token.c", | |
429 "nss/lib/ckfw/wrap.c", | |
430 ] | |
431 | |
432 configs -= [ | |
433 "//build/config/compiler:chromium_code" | |
434 ] | |
435 | |
436 if (is_win) { | |
437 configs -= [ | |
438 "//build/config/win:unicode", # Requires 8-bit mode. | |
439 ] | |
440 } | |
441 configs += [ "//build/config/compiler:no_chromium_code" ] | |
442 | |
443 include_dirs = [ "nss/lib/ckfw" ] | |
444 direct_dependent_configs = [ ":nssckbi_config" ] | |
445 | |
446 deps = [ | |
447 ":nss_static", | |
448 ] | |
449 forward_dependent_configs_from = deps | |
450 } | |
451 | |
452 config("nss_static_config") { | |
453 defines = [ | |
454 "NSS_STATIC", | |
455 "NSS_USE_STATIC_LIBS", | |
456 "USE_UTIL_DIRECTLY", | |
457 ] | |
458 if (is_win) { | |
459 defines += [ "_WINDOWS" ] | |
460 } | |
461 include_dirs = [ | |
462 "nspr/pr/include", | |
463 "nspr/lib/ds", | |
464 "nspr/lib/libc/include", | |
465 "nss/lib/base", | |
466 "nss/lib/certdb", | |
467 "nss/lib/certhigh", | |
468 "nss/lib/cryptohi", | |
469 "nss/lib/dev", | |
470 "nss/lib/freebl", | |
471 "nss/lib/freebl/ecl", | |
472 "nss/lib/nss", | |
473 "nss/lib/pk11wrap", | |
474 "nss/lib/pkcs7", | |
475 "nss/lib/pki", | |
476 "nss/lib/smime", | |
477 "nss/lib/softoken", | |
478 "nss/lib/util", | |
479 ] | |
480 } | |
481 | |
482 source_set("nss_static") { | |
483 visibility = [ ":*" ] # Internal implementation detail. | |
484 | |
485 sources = [ | |
486 "nss/lib/base/arena.c", | |
487 "nss/lib/base/base.h", | |
488 "nss/lib/base/baset.h", | |
489 "nss/lib/base/error.c", | |
490 "nss/lib/base/errorval.c", | |
491 "nss/lib/base/hash.c", | |
492 "nss/lib/base/hashops.c", | |
493 "nss/lib/base/item.c", | |
494 "nss/lib/base/libc.c", | |
495 "nss/lib/base/list.c", | |
496 "nss/lib/base/nssbase.h", | |
497 "nss/lib/base/nssbaset.h", | |
498 "nss/lib/base/nssutf8.c", | |
499 "nss/lib/base/tracker.c", | |
500 "nss/lib/certdb/alg1485.c", | |
501 "nss/lib/certdb/cert.h", | |
502 "nss/lib/certdb/certdb.c", | |
503 "nss/lib/certdb/certdb.h", | |
504 "nss/lib/certdb/certi.h", | |
505 "nss/lib/certdb/certt.h", | |
506 "nss/lib/certdb/certv3.c", | |
507 "nss/lib/certdb/certxutl.c", | |
508 "nss/lib/certdb/certxutl.h", | |
509 "nss/lib/certdb/crl.c", | |
510 "nss/lib/certdb/genname.c", | |
511 "nss/lib/certdb/genname.h", | |
512 "nss/lib/certdb/polcyxtn.c", | |
513 "nss/lib/certdb/secname.c", | |
514 "nss/lib/certdb/stanpcertdb.c", | |
515 "nss/lib/certdb/xauthkid.c", | |
516 "nss/lib/certdb/xbsconst.c", | |
517 "nss/lib/certdb/xconst.c", | |
518 "nss/lib/certdb/xconst.h", | |
519 "nss/lib/certhigh/certhigh.c", | |
520 "nss/lib/certhigh/certhtml.c", | |
521 "nss/lib/certhigh/certreq.c", | |
522 "nss/lib/certhigh/certvfy.c", | |
523 "nss/lib/certhigh/crlv2.c", | |
524 "nss/lib/certhigh/ocsp.c", | |
525 "nss/lib/certhigh/ocsp.h", | |
526 "nss/lib/certhigh/ocspi.h", | |
527 "nss/lib/certhigh/ocspsig.c", | |
528 "nss/lib/certhigh/ocspt.h", | |
529 "nss/lib/certhigh/ocspti.h", | |
530 "nss/lib/certhigh/xcrldist.c", | |
531 "nss/lib/cryptohi/cryptohi.h", | |
532 "nss/lib/cryptohi/cryptoht.h", | |
533 "nss/lib/cryptohi/dsautil.c", | |
534 "nss/lib/cryptohi/key.h", | |
535 "nss/lib/cryptohi/keyhi.h", | |
536 "nss/lib/cryptohi/keyi.h", | |
537 "nss/lib/cryptohi/keyt.h", | |
538 "nss/lib/cryptohi/keythi.h", | |
539 "nss/lib/cryptohi/sechash.c", | |
540 "nss/lib/cryptohi/sechash.h", | |
541 "nss/lib/cryptohi/seckey.c", | |
542 "nss/lib/cryptohi/secsign.c", | |
543 "nss/lib/cryptohi/secvfy.c", | |
544 "nss/lib/dev/ckhelper.c", | |
545 "nss/lib/dev/ckhelper.h", | |
546 "nss/lib/dev/dev.h", | |
547 "nss/lib/dev/devm.h", | |
548 "nss/lib/dev/devslot.c", | |
549 "nss/lib/dev/devt.h", | |
550 "nss/lib/dev/devtm.h", | |
551 "nss/lib/dev/devtoken.c", | |
552 "nss/lib/dev/devutil.c", | |
553 "nss/lib/dev/nssdev.h", | |
554 "nss/lib/dev/nssdevt.h", | |
555 "nss/lib/freebl/aeskeywrap.c", | |
556 "nss/lib/freebl/alg2268.c", | |
557 "nss/lib/freebl/alghmac.c", | |
558 "nss/lib/freebl/alghmac.h", | |
559 "nss/lib/freebl/arcfive.c", | |
560 "nss/lib/freebl/arcfour.c", | |
561 "nss/lib/freebl/blapi.h", | |
562 "nss/lib/freebl/blapii.h", | |
563 "nss/lib/freebl/blapit.h", | |
564 "nss/lib/freebl/build_config_mac.h", | |
565 "nss/lib/freebl/camellia.c", | |
566 "nss/lib/freebl/camellia.h", | |
567 "nss/lib/freebl/chacha20/chacha20.c", | |
568 "nss/lib/freebl/chacha20/chacha20.h", | |
569 "nss/lib/freebl/chacha20/chacha20_vec.c", | |
570 "nss/lib/freebl/chacha20poly1305.c", | |
571 "nss/lib/freebl/chacha20poly1305.h", | |
572 "nss/lib/freebl/ctr.c", | |
573 "nss/lib/freebl/ctr.h", | |
574 "nss/lib/freebl/cts.c", | |
575 "nss/lib/freebl/cts.h", | |
576 "nss/lib/freebl/des.c", | |
577 "nss/lib/freebl/des.h", | |
578 "nss/lib/freebl/desblapi.c", | |
579 "nss/lib/freebl/dh.c", | |
580 "nss/lib/freebl/drbg.c", | |
581 "nss/lib/freebl/dsa.c", | |
582 "nss/lib/freebl/ec.c", | |
583 "nss/lib/freebl/ec.h", | |
584 "nss/lib/freebl/ecdecode.c", | |
585 "nss/lib/freebl/ecl/ec2.h", | |
586 "nss/lib/freebl/ecl/ecl-curve.h", | |
587 "nss/lib/freebl/ecl/ecl-exp.h", | |
588 "nss/lib/freebl/ecl/ecl-priv.h", | |
589 "nss/lib/freebl/ecl/ecl.c", | |
590 "nss/lib/freebl/ecl/ecl.h", | |
591 "nss/lib/freebl/ecl/ecl_curve.c", | |
592 "nss/lib/freebl/ecl/ecl_gf.c", | |
593 "nss/lib/freebl/ecl/ecl_mult.c", | |
594 "nss/lib/freebl/ecl/ecp.h", | |
595 "nss/lib/freebl/ecl/ecp_256.c", | |
596 "nss/lib/freebl/ecl/ecp_256_32.c", | |
597 "nss/lib/freebl/ecl/ecp_384.c", | |
598 "nss/lib/freebl/ecl/ecp_521.c", | |
599 "nss/lib/freebl/ecl/ecp_aff.c", | |
600 "nss/lib/freebl/ecl/ecp_jac.c", | |
601 "nss/lib/freebl/ecl/ecp_jm.c", | |
602 "nss/lib/freebl/ecl/ecp_mont.c", | |
603 "nss/lib/freebl/ecl/ec_naf.c", | |
604 "nss/lib/freebl/gcm.c", | |
605 "nss/lib/freebl/gcm.h", | |
606 "nss/lib/freebl/hmacct.c", | |
607 "nss/lib/freebl/hmacct.h", | |
608 "nss/lib/freebl/jpake.c", | |
609 "nss/lib/freebl/md2.c", | |
610 "nss/lib/freebl/md5.c", | |
611 "nss/lib/freebl/mpi/logtab.h", | |
612 "nss/lib/freebl/mpi/mpcpucache.c", | |
613 "nss/lib/freebl/mpi/mpi-config.h", | |
614 "nss/lib/freebl/mpi/mpi-priv.h", | |
615 "nss/lib/freebl/mpi/mpi.c", | |
616 "nss/lib/freebl/mpi/mpi.h", | |
617 "nss/lib/freebl/mpi/mpi_amd64.c", | |
618 "nss/lib/freebl/mpi/mpi_arm.c", | |
619 "nss/lib/freebl/mpi/mpi_arm_mac.c", | |
620 "nss/lib/freebl/mpi/mpi_x86_asm.c", | |
621 "nss/lib/freebl/mpi/mplogic.c", | |
622 "nss/lib/freebl/mpi/mplogic.h", | |
623 "nss/lib/freebl/mpi/mpmontg.c", | |
624 "nss/lib/freebl/mpi/mpprime.c", | |
625 "nss/lib/freebl/mpi/mpprime.h", | |
626 "nss/lib/freebl/mpi/mp_gf2m-priv.h", | |
627 "nss/lib/freebl/mpi/mp_gf2m.c", | |
628 "nss/lib/freebl/mpi/mp_gf2m.h", | |
629 "nss/lib/freebl/mpi/primes.c", | |
630 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", | |
631 "nss/lib/freebl/poly1305/poly1305.c", | |
632 "nss/lib/freebl/poly1305/poly1305.h", | |
633 "nss/lib/freebl/pqg.c", | |
634 "nss/lib/freebl/pqg.h", | |
635 "nss/lib/freebl/rawhash.c", | |
636 "nss/lib/freebl/rijndael.c", | |
637 "nss/lib/freebl/rijndael.h", | |
638 "nss/lib/freebl/rijndael32.tab", | |
639 "nss/lib/freebl/rsa.c", | |
640 "nss/lib/freebl/rsapkcs.c", | |
641 "nss/lib/freebl/secmpi.h", | |
642 "nss/lib/freebl/secrng.h", | |
643 "nss/lib/freebl/seed.c", | |
644 "nss/lib/freebl/seed.h", | |
645 "nss/lib/freebl/sha256.h", | |
646 "nss/lib/freebl/sha512.c", | |
647 "nss/lib/freebl/sha_fast.c", | |
648 "nss/lib/freebl/sha_fast.h", | |
649 "nss/lib/freebl/shsign.h", | |
650 "nss/lib/freebl/shvfy.c", | |
651 "nss/lib/freebl/sysrand.c", | |
652 "nss/lib/freebl/tlsprfalg.c", | |
653 "nss/lib/freebl/unix_rand.c", | |
654 "nss/lib/freebl/win_rand.c", | |
655 "nss/lib/nss/nss.h", | |
656 "nss/lib/nss/nssinit.c", | |
657 "nss/lib/nss/nssrenam.h", | |
658 "nss/lib/nss/utilwrap.c", | |
659 "nss/lib/pk11wrap/debug_module.c", | |
660 "nss/lib/pk11wrap/dev3hack.c", | |
661 "nss/lib/pk11wrap/dev3hack.h", | |
662 "nss/lib/pk11wrap/pk11akey.c", | |
663 "nss/lib/pk11wrap/pk11auth.c", | |
664 "nss/lib/pk11wrap/pk11cert.c", | |
665 "nss/lib/pk11wrap/pk11cxt.c", | |
666 "nss/lib/pk11wrap/pk11err.c", | |
667 "nss/lib/pk11wrap/pk11func.h", | |
668 "nss/lib/pk11wrap/pk11kea.c", | |
669 "nss/lib/pk11wrap/pk11list.c", | |
670 "nss/lib/pk11wrap/pk11load.c", | |
671 "nss/lib/pk11wrap/pk11mech.c", | |
672 "nss/lib/pk11wrap/pk11merge.c", | |
673 "nss/lib/pk11wrap/pk11nobj.c", | |
674 "nss/lib/pk11wrap/pk11obj.c", | |
675 "nss/lib/pk11wrap/pk11pars.c", | |
676 "nss/lib/pk11wrap/pk11pbe.c", | |
677 "nss/lib/pk11wrap/pk11pk12.c", | |
678 "nss/lib/pk11wrap/pk11pqg.c", | |
679 "nss/lib/pk11wrap/pk11pqg.h", | |
680 "nss/lib/pk11wrap/pk11priv.h", | |
681 "nss/lib/pk11wrap/pk11pub.h", | |
682 "nss/lib/pk11wrap/pk11sdr.c", | |
683 "nss/lib/pk11wrap/pk11sdr.h", | |
684 "nss/lib/pk11wrap/pk11skey.c", | |
685 "nss/lib/pk11wrap/pk11slot.c", | |
686 "nss/lib/pk11wrap/pk11util.c", | |
687 "nss/lib/pk11wrap/secmod.h", | |
688 "nss/lib/pk11wrap/secmodi.h", | |
689 "nss/lib/pk11wrap/secmodt.h", | |
690 "nss/lib/pk11wrap/secmodti.h", | |
691 "nss/lib/pk11wrap/secpkcs5.h", | |
692 "nss/lib/pkcs7/certread.c", | |
693 "nss/lib/pkcs7/p7common.c", | |
694 "nss/lib/pkcs7/p7create.c", | |
695 "nss/lib/pkcs7/p7decode.c", | |
696 "nss/lib/pkcs7/p7encode.c", | |
697 "nss/lib/pkcs7/p7local.c", | |
698 "nss/lib/pkcs7/p7local.h", | |
699 "nss/lib/pkcs7/pkcs7t.h", | |
700 "nss/lib/pkcs7/secmime.c", | |
701 "nss/lib/pkcs7/secmime.h", | |
702 "nss/lib/pkcs7/secpkcs7.h", | |
703 "nss/lib/pki/asymmkey.c", | |
704 "nss/lib/pki/certdecode.c", | |
705 "nss/lib/pki/certificate.c", | |
706 "nss/lib/pki/cryptocontext.c", | |
707 "nss/lib/pki/nsspki.h", | |
708 "nss/lib/pki/nsspkit.h", | |
709 "nss/lib/pki/pki.h", | |
710 "nss/lib/pki/pki3hack.c", | |
711 "nss/lib/pki/pki3hack.h", | |
712 "nss/lib/pki/pkibase.c", | |
713 "nss/lib/pki/pkim.h", | |
714 "nss/lib/pki/pkistore.c", | |
715 "nss/lib/pki/pkistore.h", | |
716 "nss/lib/pki/pkit.h", | |
717 "nss/lib/pki/pkitm.h", | |
718 "nss/lib/pki/symmkey.c", | |
719 "nss/lib/pki/tdcache.c", | |
720 "nss/lib/pki/trustdomain.c", | |
721 "nss/lib/smime/cms.h", | |
722 "nss/lib/smime/cmslocal.h", | |
723 "nss/lib/smime/cmsreclist.h", | |
724 "nss/lib/smime/cmst.h", | |
725 "nss/lib/smime/smime.h", | |
726 "nss/lib/softoken/fipsaudt.c", | |
727 "nss/lib/softoken/fipstest.c", | |
728 "nss/lib/softoken/fipstokn.c", | |
729 "nss/lib/softoken/jpakesftk.c", | |
730 "nss/lib/softoken/lgglue.c", | |
731 "nss/lib/softoken/lgglue.h", | |
732 "nss/lib/softoken/lowkey.c", | |
733 "nss/lib/softoken/lowkeyi.h", | |
734 "nss/lib/softoken/lowkeyti.h", | |
735 "nss/lib/softoken/lowpbe.c", | |
736 "nss/lib/softoken/lowpbe.h", | |
737 "nss/lib/softoken/padbuf.c", | |
738 "nss/lib/softoken/pkcs11.c", | |
739 "nss/lib/softoken/pkcs11c.c", | |
740 "nss/lib/softoken/pkcs11i.h", | |
741 "nss/lib/softoken/pkcs11ni.h", | |
742 "nss/lib/softoken/pkcs11u.c", | |
743 "nss/lib/softoken/sdb.c", | |
744 "nss/lib/softoken/sdb.h", | |
745 "nss/lib/softoken/sftkdb.c", | |
746 "nss/lib/softoken/sftkdb.h", | |
747 "nss/lib/softoken/sftkdbt.h", | |
748 "nss/lib/softoken/sftkdbti.h", | |
749 "nss/lib/softoken/sftkhmac.c", | |
750 "nss/lib/softoken/sftkpars.c", | |
751 "nss/lib/softoken/sftkpars.h", | |
752 "nss/lib/softoken/sftkpwd.c", | |
753 "nss/lib/softoken/softkver.c", | |
754 "nss/lib/softoken/softkver.h", | |
755 "nss/lib/softoken/softoken.h", | |
756 "nss/lib/softoken/softoknt.h", | |
757 "nss/lib/softoken/tlsprf.c", | |
758 "nss/lib/ssl/sslerr.h", | |
759 "nss/lib/util/SECerrs.h", | |
760 "nss/lib/util/base64.h", | |
761 "nss/lib/util/ciferfam.h", | |
762 "nss/lib/util/derdec.c", | |
763 "nss/lib/util/derenc.c", | |
764 "nss/lib/util/dersubr.c", | |
765 "nss/lib/util/dertime.c", | |
766 "nss/lib/util/errstrs.c", | |
767 "nss/lib/util/hasht.h", | |
768 "nss/lib/util/nssb64.h", | |
769 "nss/lib/util/nssb64d.c", | |
770 "nss/lib/util/nssb64e.c", | |
771 "nss/lib/util/nssb64t.h", | |
772 "nss/lib/util/nssilckt.h", | |
773 "nss/lib/util/nssilock.c", | |
774 "nss/lib/util/nssilock.h", | |
775 "nss/lib/util/nsslocks.h", | |
776 "nss/lib/util/nssrwlk.c", | |
777 "nss/lib/util/nssrwlk.h", | |
778 "nss/lib/util/nssrwlkt.h", | |
779 "nss/lib/util/nssutil.h", | |
780 "nss/lib/util/oidstring.c", | |
781 "nss/lib/util/pkcs11.h", | |
782 "nss/lib/util/pkcs11f.h", | |
783 "nss/lib/util/pkcs11n.h", | |
784 "nss/lib/util/pkcs11p.h", | |
785 "nss/lib/util/pkcs11t.h", | |
786 "nss/lib/util/pkcs11u.h", | |
787 "nss/lib/util/portreg.c", | |
788 "nss/lib/util/portreg.h", | |
789 "nss/lib/util/quickder.c", | |
790 "nss/lib/util/secalgid.c", | |
791 "nss/lib/util/secasn1.h", | |
792 "nss/lib/util/secasn1d.c", | |
793 "nss/lib/util/secasn1e.c", | |
794 "nss/lib/util/secasn1t.h", | |
795 "nss/lib/util/secasn1u.c", | |
796 "nss/lib/util/seccomon.h", | |
797 "nss/lib/util/secder.h", | |
798 "nss/lib/util/secdert.h", | |
799 "nss/lib/util/secdig.c", | |
800 "nss/lib/util/secdig.h", | |
801 "nss/lib/util/secdigt.h", | |
802 "nss/lib/util/secerr.h", | |
803 "nss/lib/util/secitem.c", | |
804 "nss/lib/util/secitem.h", | |
805 "nss/lib/util/secoid.c", | |
806 "nss/lib/util/secoid.h", | |
807 "nss/lib/util/secoidt.h", | |
808 "nss/lib/util/secport.c", | |
809 "nss/lib/util/secport.h", | |
810 "nss/lib/util/sectime.c", | |
811 "nss/lib/util/templates.c", | |
812 "nss/lib/util/utf8.c", | |
813 "nss/lib/util/utilmod.c", | |
814 "nss/lib/util/utilmodt.h", | |
815 "nss/lib/util/utilpars.c", | |
816 "nss/lib/util/utilpars.h", | |
817 "nss/lib/util/utilparst.h", | |
818 "nss/lib/util/utilrename.h", | |
819 ] | |
820 | |
821 sources -= [ | |
822 # mpi_arm.c is included by mpi_arm_mac.c. | |
823 # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need | |
824 # to be excluded conditionally if we start to build NSS on Linux. | |
825 "nss/lib/freebl/mpi/mpi_arm.c", | |
826 # primes.c is included by mpprime.c. | |
827 "nss/lib/freebl/mpi/primes.c", | |
828 # unix_rand.c and win_rand.c are included by sysrand.c. | |
829 "nss/lib/freebl/unix_rand.c", | |
830 "nss/lib/freebl/win_rand.c", | |
831 # debug_module.c is included by pk11load.c. | |
832 "nss/lib/pk11wrap/debug_module.c", | |
833 ] | |
834 | |
835 configs -= [ | |
836 "//build/config/compiler:chromium_code" | |
837 ] | |
838 if (is_win) { | |
839 configs -= [ | |
840 "//build/config/win:unicode", # Requires 8-bit mode. | |
841 ] | |
842 } | |
843 configs += [ "//build/config/compiler:no_chromium_code" ] | |
844 direct_dependent_configs = [ ":nss_static_config" ] | |
845 | |
846 cflags = [] | |
847 | |
848 # Only need the defines and includes not in nss_static_config. | |
849 defines = [ | |
850 "MP_API_COMPATIBLE", | |
851 "NSS_DISABLE_DBM", | |
852 "RIJNDAEL_INCLUDE_TABLES", | |
853 "SHLIB_VERSION=\"3\"", | |
854 "SOFTOKEN_SHLIB_VERSION=\"3\"", | |
855 ] | |
856 include_dirs = [ | |
857 "nss/lib/freebl/mpi", | |
858 "nss/lib/ssl", | |
859 ] | |
860 | |
861 if (is_win) { | |
862 cflags += [ | |
863 "/wd4101", # Unreferenced local variable. | |
864 "/wd4267", # Conversion from size_t to "type". | |
865 ] | |
866 } | |
867 | |
868 if (include_nss_libpkix) { | |
869 sources += [ | |
870 "nss/lib/certhigh/certvfypkix.c", | |
871 "nss/lib/certhigh/certvfypkixprint.c", | |
872 "nss/lib/libpkix/include/pkix.h", | |
873 "nss/lib/libpkix/include/pkix_certsel.h", | |
874 "nss/lib/libpkix/include/pkix_certstore.h", | |
875 "nss/lib/libpkix/include/pkix_checker.h", | |
876 "nss/lib/libpkix/include/pkix_crlsel.h", | |
877 "nss/lib/libpkix/include/pkix_errorstrings.h", | |
878 "nss/lib/libpkix/include/pkix_params.h", | |
879 "nss/lib/libpkix/include/pkix_pl_pki.h", | |
880 "nss/lib/libpkix/include/pkix_pl_system.h", | |
881 "nss/lib/libpkix/include/pkix_results.h", | |
882 "nss/lib/libpkix/include/pkix_revchecker.h", | |
883 "nss/lib/libpkix/include/pkix_sample_modules.h", | |
884 "nss/lib/libpkix/include/pkix_util.h", | |
885 "nss/lib/libpkix/include/pkixt.h", | |
886 "nss/lib/libpkix/pkix/certsel/pkix_certselector.c", | |
887 "nss/lib/libpkix/pkix/certsel/pkix_certselector.h", | |
888 "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c", | |
889 "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h", | |
890 "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c", | |
891 "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h", | |
892 "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c", | |
893 "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h", | |
894 "nss/lib/libpkix/pkix/checker/pkix_crlchecker.c", | |
895 "nss/lib/libpkix/pkix/checker/pkix_crlchecker.h", | |
896 "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c", | |
897 "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h", | |
898 "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c", | |
899 "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h", | |
900 "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c", | |
901 "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h", | |
902 "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c", | |
903 "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h", | |
904 "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c", | |
905 "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h", | |
906 "nss/lib/libpkix/pkix/checker/pkix_policychecker.c", | |
907 "nss/lib/libpkix/pkix/checker/pkix_policychecker.h", | |
908 "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c", | |
909 "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h", | |
910 "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c", | |
911 "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h", | |
912 "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c", | |
913 "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h", | |
914 "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c", | |
915 "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h", | |
916 "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c", | |
917 "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h", | |
918 "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c", | |
919 "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h", | |
920 "nss/lib/libpkix/pkix/params/pkix_procparams.c", | |
921 "nss/lib/libpkix/pkix/params/pkix_procparams.h", | |
922 "nss/lib/libpkix/pkix/params/pkix_resourcelimits.c", | |
923 "nss/lib/libpkix/pkix/params/pkix_resourcelimits.h", | |
924 "nss/lib/libpkix/pkix/params/pkix_trustanchor.c", | |
925 "nss/lib/libpkix/pkix/params/pkix_trustanchor.h", | |
926 "nss/lib/libpkix/pkix/params/pkix_valparams.c", | |
927 "nss/lib/libpkix/pkix/params/pkix_valparams.h", | |
928 "nss/lib/libpkix/pkix/results/pkix_buildresult.c", | |
929 "nss/lib/libpkix/pkix/results/pkix_buildresult.h", | |
930 "nss/lib/libpkix/pkix/results/pkix_policynode.c", | |
931 "nss/lib/libpkix/pkix/results/pkix_policynode.h", | |
932 "nss/lib/libpkix/pkix/results/pkix_valresult.c", | |
933 "nss/lib/libpkix/pkix/results/pkix_valresult.h", | |
934 "nss/lib/libpkix/pkix/results/pkix_verifynode.c", | |
935 "nss/lib/libpkix/pkix/results/pkix_verifynode.h", | |
936 "nss/lib/libpkix/pkix/store/pkix_store.c", | |
937 "nss/lib/libpkix/pkix/store/pkix_store.h", | |
938 "nss/lib/libpkix/pkix/top/pkix_build.c", | |
939 "nss/lib/libpkix/pkix/top/pkix_build.h", | |
940 "nss/lib/libpkix/pkix/top/pkix_lifecycle.c", | |
941 "nss/lib/libpkix/pkix/top/pkix_lifecycle.h", | |
942 "nss/lib/libpkix/pkix/top/pkix_validate.c", | |
943 "nss/lib/libpkix/pkix/top/pkix_validate.h", | |
944 "nss/lib/libpkix/pkix/util/pkix_error.c", | |
945 "nss/lib/libpkix/pkix/util/pkix_error.h", | |
946 "nss/lib/libpkix/pkix/util/pkix_errpaths.c", | |
947 "nss/lib/libpkix/pkix/util/pkix_list.c", | |
948 "nss/lib/libpkix/pkix/util/pkix_list.h", | |
949 "nss/lib/libpkix/pkix/util/pkix_logger.c", | |
950 "nss/lib/libpkix/pkix/util/pkix_logger.h", | |
951 "nss/lib/libpkix/pkix/util/pkix_tools.c", | |
952 "nss/lib/libpkix/pkix/util/pkix_tools.h", | |
953 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c", | |
954 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h", | |
955 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c", | |
956 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h", | |
957 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c", | |
958 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h", | |
959 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c", | |
960 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h", | |
961 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c", | |
962 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h", | |
963 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c", | |
964 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h", | |
965 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c", | |
966 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h", | |
967 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c", | |
968 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h", | |
969 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c", | |
970 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h", | |
971 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c", | |
972 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h", | |
973 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c", | |
974 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h", | |
975 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c", | |
976 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h", | |
977 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c", | |
978 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h", | |
979 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c", | |
980 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h", | |
981 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c", | |
982 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h", | |
983 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c", | |
984 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h", | |
985 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c", | |
986 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h", | |
987 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c", | |
988 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h", | |
989 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c", | |
990 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h", | |
991 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c", | |
992 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h", | |
993 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c", | |
994 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h", | |
995 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c", | |
996 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h", | |
997 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c", | |
998 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h", | |
999 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c", | |
1000 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h", | |
1001 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c", | |
1002 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h", | |
1003 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c", | |
1004 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h", | |
1005 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c", | |
1006 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h", | |
1007 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c", | |
1008 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c", | |
1009 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h", | |
1010 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c", | |
1011 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h", | |
1012 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c", | |
1013 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h", | |
1014 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c", | |
1015 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h", | |
1016 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c", | |
1017 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h", | |
1018 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c", | |
1019 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h", | |
1020 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c", | |
1021 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h", | |
1022 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c", | |
1023 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h", | |
1024 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c", | |
1025 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h", | |
1026 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c", | |
1027 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h", | |
1028 ] | |
1029 | |
1030 # Disable the LDAP code in libpkix. | |
1031 defines += [ "NSS_PKIX_NO_LDAP" ] | |
1032 | |
1033 include_dirs += [ | |
1034 "nss/lib/libpkix/include", | |
1035 "nss/lib/libpkix/pkix/certsel", | |
1036 "nss/lib/libpkix/pkix/checker", | |
1037 "nss/lib/libpkix/pkix/crlsel", | |
1038 "nss/lib/libpkix/pkix/params", | |
1039 "nss/lib/libpkix/pkix/results", | |
1040 "nss/lib/libpkix/pkix/store", | |
1041 "nss/lib/libpkix/pkix/top", | |
1042 "nss/lib/libpkix/pkix/util", | |
1043 "nss/lib/libpkix/pkix_pl_nss/module", | |
1044 "nss/lib/libpkix/pkix_pl_nss/pki", | |
1045 "nss/lib/libpkix/pkix_pl_nss/system", | |
1046 ] | |
1047 } else { | |
1048 defines += [ "NSS_DISABLE_LIBPKIX" ] | |
1049 } | |
1050 | |
1051 if (!include_nss_root_certs) { | |
1052 defines += [ "NSS_DISABLE_ROOT_CERTS" ] | |
1053 } | |
1054 | |
1055 if (cpu_arch == "x64" && !is_win) { | |
1056 sources -= [ | |
1057 "nss/lib/freebl/chacha20/chacha20.c", | |
1058 "nss/lib/freebl/poly1305/poly1305.c", | |
1059 ] | |
1060 } else { | |
1061 sources -= [ | |
1062 "nss/lib/freebl/chacha20/chacha20_vec.c", | |
1063 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", | |
1064 ] | |
1065 } | |
1066 | |
1067 if (is_mac || is_ios) { | |
1068 sources -= [ | |
1069 "nss/lib/freebl/mpi/mpi_amd64.c", | |
1070 ] | |
1071 cflags += [ | |
1072 "-include", | |
1073 rebase_path("//third_party/nss/nss/lib/freebl/build_config_mac.h", | |
1074 root_build_dir), | |
1075 ] | |
1076 defines += [ | |
1077 "XP_UNIX", | |
1078 "DARWIN", | |
1079 "HAVE_STRERROR", | |
1080 "HAVE_BSD_FLOCK", | |
1081 "SHLIB_SUFFIX=\"dylib\"", | |
1082 "SHLIB_PREFIX=\"lib\"", | |
1083 "SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"", | |
1084 ] | |
1085 | |
1086 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
1087 } else { | |
1088 # Not Mac/iOS. | |
1089 sources -= [ "nss/lib/freebl/mpi/mpi_arm_mac.c" ] | |
1090 } | |
1091 | |
1092 if (is_win) { | |
1093 defines += [ | |
1094 "SHLIB_SUFFIX=\"dll\"", | |
1095 "SHLIB_PREFIX=\"\"", | |
1096 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", | |
1097 "XP_PC", | |
1098 "WIN32", | |
1099 "WIN95", | |
1100 ] | |
1101 | |
1102 if (cpu_arch == "x86") { | |
1103 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] | |
1104 defines += [ | |
1105 "NSS_X86_OR_X64", | |
1106 "NSS_X86", | |
1107 "_X86_", | |
1108 "MP_ASSEMBLY_MULTIPLY", | |
1109 "MP_ASSEMBLY_SQUARE", | |
1110 "MP_ASSEMBLY_DIV_2DX1D", | |
1111 "MP_USE_UINT_DIGIT", | |
1112 "MP_NO_MP_WORD", | |
1113 "USE_HW_AES", | |
1114 "INTEL_GCM", | |
1115 ] | |
1116 } else if (cpu_arch == "x64") { | |
1117 sources -= [ "nss/lib/freebl/mpi/mpi_x86_asm.c" ] | |
1118 defines += [ | |
1119 "NSS_USE_64", | |
1120 "NSS_X86_OR_X64", | |
1121 "NSS_X64", | |
1122 "_AMD64_", | |
1123 "MP_CHAR_STORE_SLOW", | |
1124 "MP_IS_LITTLE_ENDIAN", | |
1125 "WIN64", | |
1126 ] | |
1127 } | |
1128 } else { | |
1129 # Not Windows. | |
1130 sources -= [ | |
1131 # mpi_x86_asm.c contains MSVC inline assembly code. | |
1132 "nss/lib/freebl/mpi/mpi_x86_asm.c", | |
1133 ] | |
1134 } | |
1135 | |
1136 if (is_clang) { | |
1137 cflags += [ | |
1138 # nss doesn"t explicitly cast between different enum types. | |
1139 "-Wno-conversion", | |
1140 # nss passes "const char*" through "void*". | |
1141 "-Wno-incompatible-pointer-types", | |
1142 # nss prefers `a && b || c` over `(a && b) || c`. | |
1143 "-Wno-logical-op-parentheses", | |
1144 # nss doesn"t use exhaustive switches on enums | |
1145 "-Wno-switch", | |
1146 # nss has some `unsigned < 0` checks. | |
1147 "-Wno-tautological-compare", | |
1148 ] | |
1149 } | |
1150 | |
1151 deps = [ | |
1152 ":nspr", | |
1153 "//third_party/sqlite", | |
1154 ] | |
1155 | |
1156 forward_dependent_configs_from = [ ":nspr" ] | |
1157 } | |
1158 } # Windows/Mac/iOS. | |
1159 | |
OLD | NEW |