1 # Copyright 2014 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 public_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 public_deps = [ ":nss_static" ] 352 353 if (include_nss_root_certs) { 354 public_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 367 config("nssckbi_config") { 368 include_dirs = [ "nss/lib/ckfw/builtins" ] 369 } 370 371 # This is really more of a pseudo-target to work around the fact that 372 # a single static_library target cannot contain two object files of the 373 # same name (hash.o / hash.obj). Logically, this is part of the 374 # "nss_static" target. By separating it out, it creates a possible 375 # circular dependency between "nss_static" and "nssckbi" when 376 # "exclude_nss_root_certs" is not specified, as "nss_static" depends on 377 # the "builtinsC_GetFunctionList" exported by this target. This is an 378 # artifact of how NSS is being statically built, which is not an 379 # officially supported configuration - normally, "nssckbi.dll/so" would 380 # depend on libnss3.dll/so, and the higher layer caller would instruct 381 # libnss3.dll to dynamically load nssckbi.dll, breaking the circle. 382 # 383 # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency 384 # without requiring nssckbi to be built as a shared library. 385 source_set("nssckbi") { 386 visibility = [ ":nss" ] # This target is internal implementation detail. 387 388 sources = [ 389 "nss/lib/ckfw/builtins/anchor.c", 390 "nss/lib/ckfw/builtins/bfind.c", 391 "nss/lib/ckfw/builtins/binst.c", 392 "nss/lib/ckfw/builtins/bobject.c", 393 "nss/lib/ckfw/builtins/bsession.c", 394 "nss/lib/ckfw/builtins/bslot.c", 395 "nss/lib/ckfw/builtins/btoken.c", 396 "nss/lib/ckfw/builtins/builtins.h", 397 "nss/lib/ckfw/builtins/certdata.c", 398 "nss/lib/ckfw/builtins/ckbiver.c", 399 "nss/lib/ckfw/builtins/constants.c", 400 "nss/lib/ckfw/builtins/nssckbi.h", 401 "nss/lib/ckfw/ck.h", 402 "nss/lib/ckfw/ckfw.h", 403 "nss/lib/ckfw/ckfwm.h", 404 "nss/lib/ckfw/ckfwtm.h", 405 "nss/lib/ckfw/ckmd.h", 406 "nss/lib/ckfw/ckt.h", 407 "nss/lib/ckfw/crypto.c", 408 "nss/lib/ckfw/find.c", 409 "nss/lib/ckfw/hash.c", 410 "nss/lib/ckfw/instance.c", 411 "nss/lib/ckfw/mechanism.c", 412 "nss/lib/ckfw/mutex.c", 413 "nss/lib/ckfw/nssck.api", 414 "nss/lib/ckfw/nssckepv.h", 415 "nss/lib/ckfw/nssckft.h", 416 "nss/lib/ckfw/nssckfw.h", 417 "nss/lib/ckfw/nssckfwc.h", 418 "nss/lib/ckfw/nssckfwt.h", 419 "nss/lib/ckfw/nssckg.h", 420 "nss/lib/ckfw/nssckmdt.h", 421 "nss/lib/ckfw/nssckt.h", 422 "nss/lib/ckfw/object.c", 423 "nss/lib/ckfw/session.c", 424 "nss/lib/ckfw/sessobj.c", 425 "nss/lib/ckfw/slot.c", 426 "nss/lib/ckfw/token.c", 427 "nss/lib/ckfw/wrap.c", 428 ] 429 430 configs -= [ 431 "//build/config/compiler:chromium_code" 432 ] 433 434 if (is_win) { 435 configs -= [ 436 "//build/config/win:unicode", # Requires 8-bit mode. 437 ] 438 } 439 configs += [ "//build/config/compiler:no_chromium_code" ] 440 441 include_dirs = [ "nss/lib/ckfw" ] 442 public_configs = [ ":nssckbi_config" ] 443 444 public_deps = [ 445 ":nss_static", 446 ] 447 } 448 449 config("nss_static_config") { 450 defines = [ 451 "NSS_STATIC", 452 "NSS_USE_STATIC_LIBS", 453 "USE_UTIL_DIRECTLY", 454 ] 455 if (is_win) { 456 defines += [ "_WINDOWS" ] 457 } 458 include_dirs = [ 459 "nspr/pr/include", 460 "nspr/lib/ds", 461 "nspr/lib/libc/include", 462 "nss/lib/base", 463 "nss/lib/certdb", 464 "nss/lib/certhigh", 465 "nss/lib/cryptohi", 466 "nss/lib/dev", 467 "nss/lib/freebl", 468 "nss/lib/freebl/ecl", 469 "nss/lib/nss", 470 "nss/lib/pk11wrap", 471 "nss/lib/pkcs7", 472 "nss/lib/pki", 473 "nss/lib/smime", 474 "nss/lib/softoken", 475 "nss/lib/util", 476 ] 477 } 478 479 source_set("nss_static") { 480 visibility = [ ":*" ] # Internal implementation detail. 481 482 sources = [ 483 "nss/lib/base/arena.c", 484 "nss/lib/base/base.h", 485 "nss/lib/base/baset.h", 486 "nss/lib/base/error.c", 487 "nss/lib/base/errorval.c", 488 "nss/lib/base/hash.c", 489 "nss/lib/base/hashops.c", 490 "nss/lib/base/item.c", 491 "nss/lib/base/libc.c", 492 "nss/lib/base/list.c", 493 "nss/lib/base/nssbase.h", 494 "nss/lib/base/nssbaset.h", 495 "nss/lib/base/nssutf8.c", 496 "nss/lib/base/tracker.c", 497 "nss/lib/certdb/alg1485.c", 498 "nss/lib/certdb/cert.h", 499 "nss/lib/certdb/certdb.c", 500 "nss/lib/certdb/certdb.h", 501 "nss/lib/certdb/certi.h", 502 "nss/lib/certdb/certt.h", 503 "nss/lib/certdb/certv3.c", 504 "nss/lib/certdb/certxutl.c", 505 "nss/lib/certdb/certxutl.h", 506 "nss/lib/certdb/crl.c", 507 "nss/lib/certdb/genname.c", 508 "nss/lib/certdb/genname.h", 509 "nss/lib/certdb/polcyxtn.c", 510 "nss/lib/certdb/secname.c", 511 "nss/lib/certdb/stanpcertdb.c", 512 "nss/lib/certdb/xauthkid.c", 513 "nss/lib/certdb/xbsconst.c", 514 "nss/lib/certdb/xconst.c", 515 "nss/lib/certdb/xconst.h", 516 "nss/lib/certhigh/certhigh.c", 517 "nss/lib/certhigh/certhtml.c", 518 "nss/lib/certhigh/certreq.c", 519 "nss/lib/certhigh/certvfy.c", 520 "nss/lib/certhigh/crlv2.c", 521 "nss/lib/certhigh/ocsp.c", 522 "nss/lib/certhigh/ocsp.h", 523 "nss/lib/certhigh/ocspi.h", 524 "nss/lib/certhigh/ocspsig.c", 525 "nss/lib/certhigh/ocspt.h", 526 "nss/lib/certhigh/ocspti.h", 527 "nss/lib/certhigh/xcrldist.c", 528 "nss/lib/cryptohi/cryptohi.h", 529 "nss/lib/cryptohi/cryptoht.h", 530 "nss/lib/cryptohi/dsautil.c", 531 "nss/lib/cryptohi/key.h", 532 "nss/lib/cryptohi/keyhi.h", 533 "nss/lib/cryptohi/keyi.h", 534 "nss/lib/cryptohi/keyt.h", 535 "nss/lib/cryptohi/keythi.h", 536 "nss/lib/cryptohi/sechash.c", 537 "nss/lib/cryptohi/sechash.h", 538 "nss/lib/cryptohi/seckey.c", 539 "nss/lib/cryptohi/secsign.c", 540 "nss/lib/cryptohi/secvfy.c", 541 "nss/lib/dev/ckhelper.c", 542 "nss/lib/dev/ckhelper.h", 543 "nss/lib/dev/dev.h", 544 "nss/lib/dev/devm.h", 545 "nss/lib/dev/devslot.c", 546 "nss/lib/dev/devt.h", 547 "nss/lib/dev/devtm.h", 548 "nss/lib/dev/devtoken.c", 549 "nss/lib/dev/devutil.c", 550 "nss/lib/dev/nssdev.h", 551 "nss/lib/dev/nssdevt.h", 552 "nss/lib/freebl/aeskeywrap.c", 553 "nss/lib/freebl/alg2268.c", 554 "nss/lib/freebl/alghmac.c", 555 "nss/lib/freebl/alghmac.h", 556 "nss/lib/freebl/arcfive.c", 557 "nss/lib/freebl/arcfour.c", 558 "nss/lib/freebl/blapi.h", 559 "nss/lib/freebl/blapii.h", 560 "nss/lib/freebl/blapit.h", 561 "nss/lib/freebl/camellia.c", 562 "nss/lib/freebl/camellia.h", 563 "nss/lib/freebl/chacha20/chacha20.c", 564 "nss/lib/freebl/chacha20/chacha20.h", 565 "nss/lib/freebl/chacha20/chacha20_vec.c", 566 "nss/lib/freebl/chacha20poly1305.c", 567 "nss/lib/freebl/chacha20poly1305.h", 568 "nss/lib/freebl/ctr.c", 569 "nss/lib/freebl/ctr.h", 570 "nss/lib/freebl/cts.c", 571 "nss/lib/freebl/cts.h", 572 "nss/lib/freebl/des.c", 573 "nss/lib/freebl/des.h", 574 "nss/lib/freebl/desblapi.c", 575 "nss/lib/freebl/dh.c", 576 "nss/lib/freebl/drbg.c", 577 "nss/lib/freebl/dsa.c", 578 "nss/lib/freebl/ec.c", 579 "nss/lib/freebl/ec.h", 580 "nss/lib/freebl/ecdecode.c", 581 "nss/lib/freebl/ecl/ec2.h", 582 "nss/lib/freebl/ecl/ecl-curve.h", 583 "nss/lib/freebl/ecl/ecl-exp.h", 584 "nss/lib/freebl/ecl/ecl-priv.h", 585 "nss/lib/freebl/ecl/ecl.c", 586 "nss/lib/freebl/ecl/ecl.h", 587 "nss/lib/freebl/ecl/ecl_curve.c", 588 "nss/lib/freebl/ecl/ecl_gf.c", 589 "nss/lib/freebl/ecl/ecl_mult.c", 590 "nss/lib/freebl/ecl/ecp.h", 591 "nss/lib/freebl/ecl/ecp_256.c", 592 "nss/lib/freebl/ecl/ecp_256_32.c", 593 "nss/lib/freebl/ecl/ecp_384.c", 594 "nss/lib/freebl/ecl/ecp_521.c", 595 "nss/lib/freebl/ecl/ecp_aff.c", 596 "nss/lib/freebl/ecl/ecp_jac.c", 597 "nss/lib/freebl/ecl/ecp_jm.c", 598 "nss/lib/freebl/ecl/ecp_mont.c", 599 "nss/lib/freebl/ecl/ec_naf.c", 600 "nss/lib/freebl/gcm.c", 601 "nss/lib/freebl/gcm.h", 602 "nss/lib/freebl/hmacct.c", 603 "nss/lib/freebl/hmacct.h", 604 "nss/lib/freebl/jpake.c", 605 "nss/lib/freebl/md2.c", 606 "nss/lib/freebl/md5.c", 607 "nss/lib/freebl/mpi/logtab.h", 608 "nss/lib/freebl/mpi/mpcpucache.c", 609 "nss/lib/freebl/mpi/mpi-config.h", 610 "nss/lib/freebl/mpi/mpi-priv.h", 611 "nss/lib/freebl/mpi/mpi.c", 612 "nss/lib/freebl/mpi/mpi.h", 613 "nss/lib/freebl/mpi/mpi_amd64.c", 614 "nss/lib/freebl/mpi/mpi_arm.c", 615 "nss/lib/freebl/mpi/mpi_arm_mac.c", 616 "nss/lib/freebl/mpi/mpi_x86_asm.c", 617 "nss/lib/freebl/mpi/mplogic.c", 618 "nss/lib/freebl/mpi/mplogic.h", 619 "nss/lib/freebl/mpi/mpmontg.c", 620 "nss/lib/freebl/mpi/mpprime.c", 621 "nss/lib/freebl/mpi/mpprime.h", 622 "nss/lib/freebl/mpi/mp_gf2m-priv.h", 623 "nss/lib/freebl/mpi/mp_gf2m.c", 624 "nss/lib/freebl/mpi/mp_gf2m.h", 625 "nss/lib/freebl/mpi/primes.c", 626 "nss/lib/freebl/nss_build_config_mac.h", 627 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", 628 "nss/lib/freebl/poly1305/poly1305.c", 629 "nss/lib/freebl/poly1305/poly1305.h", 630 "nss/lib/freebl/pqg.c", 631 "nss/lib/freebl/pqg.h", 632 "nss/lib/freebl/rawhash.c", 633 "nss/lib/freebl/rijndael.c", 634 "nss/lib/freebl/rijndael.h", 635 "nss/lib/freebl/rijndael32.tab", 636 "nss/lib/freebl/rsa.c", 637 "nss/lib/freebl/rsapkcs.c", 638 "nss/lib/freebl/secmpi.h", 639 "nss/lib/freebl/secrng.h", 640 "nss/lib/freebl/seed.c", 641 "nss/lib/freebl/seed.h", 642 "nss/lib/freebl/sha256.h", 643 "nss/lib/freebl/sha512.c", 644 "nss/lib/freebl/sha_fast.c", 645 "nss/lib/freebl/sha_fast.h", 646 "nss/lib/freebl/shsign.h", 647 "nss/lib/freebl/shvfy.c", 648 "nss/lib/freebl/sysrand.c", 649 "nss/lib/freebl/tlsprfalg.c", 650 "nss/lib/freebl/unix_rand.c", 651 "nss/lib/freebl/win_rand.c", 652 "nss/lib/nss/nss.h", 653 "nss/lib/nss/nssinit.c", 654 "nss/lib/nss/nssrenam.h", 655 "nss/lib/nss/utilwrap.c", 656 "nss/lib/pk11wrap/debug_module.c", 657 "nss/lib/pk11wrap/dev3hack.c", 658 "nss/lib/pk11wrap/dev3hack.h", 659 "nss/lib/pk11wrap/pk11akey.c", 660 "nss/lib/pk11wrap/pk11auth.c", 661 "nss/lib/pk11wrap/pk11cert.c", 662 "nss/lib/pk11wrap/pk11cxt.c", 663 "nss/lib/pk11wrap/pk11err.c", 664 "nss/lib/pk11wrap/pk11func.h", 665 "nss/lib/pk11wrap/pk11kea.c", 666 "nss/lib/pk11wrap/pk11list.c", 667 "nss/lib/pk11wrap/pk11load.c", 668 "nss/lib/pk11wrap/pk11mech.c", 669 "nss/lib/pk11wrap/pk11merge.c", 670 "nss/lib/pk11wrap/pk11nobj.c", 671 "nss/lib/pk11wrap/pk11obj.c", 672 "nss/lib/pk11wrap/pk11pars.c", 673 "nss/lib/pk11wrap/pk11pbe.c", 674 "nss/lib/pk11wrap/pk11pk12.c", 675 "nss/lib/pk11wrap/pk11pqg.c", 676 "nss/lib/pk11wrap/pk11pqg.h", 677 "nss/lib/pk11wrap/pk11priv.h", 678 "nss/lib/pk11wrap/pk11pub.h", 679 "nss/lib/pk11wrap/pk11sdr.c", 680 "nss/lib/pk11wrap/pk11sdr.h", 681 "nss/lib/pk11wrap/pk11skey.c", 682 "nss/lib/pk11wrap/pk11slot.c", 683 "nss/lib/pk11wrap/pk11util.c", 684 "nss/lib/pk11wrap/secmod.h", 685 "nss/lib/pk11wrap/secmodi.h", 686 "nss/lib/pk11wrap/secmodt.h", 687 "nss/lib/pk11wrap/secmodti.h", 688 "nss/lib/pk11wrap/secpkcs5.h", 689 "nss/lib/pkcs7/certread.c", 690 "nss/lib/pkcs7/p7common.c", 691 "nss/lib/pkcs7/p7create.c", 692 "nss/lib/pkcs7/p7decode.c", 693 "nss/lib/pkcs7/p7encode.c", 694 "nss/lib/pkcs7/p7local.c", 695 "nss/lib/pkcs7/p7local.h", 696 "nss/lib/pkcs7/pkcs7t.h", 697 "nss/lib/pkcs7/secmime.c", 698 "nss/lib/pkcs7/secmime.h", 699 "nss/lib/pkcs7/secpkcs7.h", 700 "nss/lib/pki/asymmkey.c", 701 "nss/lib/pki/certdecode.c", 702 "nss/lib/pki/certificate.c", 703 "nss/lib/pki/cryptocontext.c", 704 "nss/lib/pki/nsspki.h", 705 "nss/lib/pki/nsspkit.h", 706 "nss/lib/pki/pki.h", 707 "nss/lib/pki/pki3hack.c", 708 "nss/lib/pki/pki3hack.h", 709 "nss/lib/pki/pkibase.c", 710 "nss/lib/pki/pkim.h", 711 "nss/lib/pki/pkistore.c", 712 "nss/lib/pki/pkistore.h", 713 "nss/lib/pki/pkit.h", 714 "nss/lib/pki/pkitm.h", 715 "nss/lib/pki/symmkey.c", 716 "nss/lib/pki/tdcache.c", 717 "nss/lib/pki/trustdomain.c", 718 "nss/lib/smime/cms.h", 719 "nss/lib/smime/cmslocal.h", 720 "nss/lib/smime/cmsreclist.h", 721 "nss/lib/smime/cmst.h", 722 "nss/lib/smime/smime.h", 723 "nss/lib/softoken/fipsaudt.c", 724 "nss/lib/softoken/fipstest.c", 725 "nss/lib/softoken/fipstokn.c", 726 "nss/lib/softoken/jpakesftk.c", 727 "nss/lib/softoken/lgglue.c", 728 "nss/lib/softoken/lgglue.h", 729 "nss/lib/softoken/lowkey.c", 730 "nss/lib/softoken/lowkeyi.h", 731 "nss/lib/softoken/lowkeyti.h", 732 "nss/lib/softoken/lowpbe.c", 733 "nss/lib/softoken/lowpbe.h", 734 "nss/lib/softoken/padbuf.c", 735 "nss/lib/softoken/pkcs11.c", 736 "nss/lib/softoken/pkcs11c.c", 737 "nss/lib/softoken/pkcs11i.h", 738 "nss/lib/softoken/pkcs11ni.h", 739 "nss/lib/softoken/pkcs11u.c", 740 "nss/lib/softoken/sdb.c", 741 "nss/lib/softoken/sdb.h", 742 "nss/lib/softoken/sftkdb.c", 743 "nss/lib/softoken/sftkdb.h", 744 "nss/lib/softoken/sftkdbt.h", 745 "nss/lib/softoken/sftkdbti.h", 746 "nss/lib/softoken/sftkhmac.c", 747 "nss/lib/softoken/sftkpars.c", 748 "nss/lib/softoken/sftkpars.h", 749 "nss/lib/softoken/sftkpwd.c", 750 "nss/lib/softoken/softkver.c", 751 "nss/lib/softoken/softkver.h", 752 "nss/lib/softoken/softoken.h", 753 "nss/lib/softoken/softoknt.h", 754 "nss/lib/softoken/tlsprf.c", 755 "nss/lib/ssl/sslerr.h", 756 "nss/lib/util/SECerrs.h", 757 "nss/lib/util/base64.h", 758 "nss/lib/util/ciferfam.h", 759 "nss/lib/util/derdec.c", 760 "nss/lib/util/derenc.c", 761 "nss/lib/util/dersubr.c", 762 "nss/lib/util/dertime.c", 763 "nss/lib/util/errstrs.c", 764 "nss/lib/util/hasht.h", 765 "nss/lib/util/nssb64.h", 766 "nss/lib/util/nssb64d.c", 767 "nss/lib/util/nssb64e.c", 768 "nss/lib/util/nssb64t.h", 769 "nss/lib/util/nssilckt.h", 770 "nss/lib/util/nssilock.c", 771 "nss/lib/util/nssilock.h", 772 "nss/lib/util/nsslocks.h", 773 "nss/lib/util/nssrwlk.c", 774 "nss/lib/util/nssrwlk.h", 775 "nss/lib/util/nssrwlkt.h", 776 "nss/lib/util/nssutil.h", 777 "nss/lib/util/oidstring.c", 778 "nss/lib/util/pkcs11.h", 779 "nss/lib/util/pkcs11f.h", 780 "nss/lib/util/pkcs11n.h", 781 "nss/lib/util/pkcs11p.h", 782 "nss/lib/util/pkcs11t.h", 783 "nss/lib/util/pkcs11u.h", 784 "nss/lib/util/portreg.c", 785 "nss/lib/util/portreg.h", 786 "nss/lib/util/quickder.c", 787 "nss/lib/util/secalgid.c", 788 "nss/lib/util/secasn1.h", 789 "nss/lib/util/secasn1d.c", 790 "nss/lib/util/secasn1e.c", 791 "nss/lib/util/secasn1t.h", 792 "nss/lib/util/secasn1u.c", 793 "nss/lib/util/seccomon.h", 794 "nss/lib/util/secder.h", 795 "nss/lib/util/secdert.h", 796 "nss/lib/util/secdig.c", 797 "nss/lib/util/secdig.h", 798 "nss/lib/util/secdigt.h", 799 "nss/lib/util/secerr.h", 800 "nss/lib/util/secitem.c", 801 "nss/lib/util/secitem.h", 802 "nss/lib/util/secoid.c", 803 "nss/lib/util/secoid.h", 804 "nss/lib/util/secoidt.h", 805 "nss/lib/util/secport.c", 806 "nss/lib/util/secport.h", 807 "nss/lib/util/sectime.c", 808 "nss/lib/util/templates.c", 809 "nss/lib/util/utf8.c", 810 "nss/lib/util/utilmod.c", 811 "nss/lib/util/utilmodt.h", 812 "nss/lib/util/utilpars.c", 813 "nss/lib/util/utilpars.h", 814 "nss/lib/util/utilparst.h", 815 "nss/lib/util/utilrename.h", 816 ] 817 818 sources -= [ 819 # mpi_arm.c is included by mpi_arm_mac.c. 820 # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need 821 # to be excluded conditionally if we start to build NSS on Linux. 822 "nss/lib/freebl/mpi/mpi_arm.c", 823 # primes.c is included by mpprime.c. 824 "nss/lib/freebl/mpi/primes.c", 825 # unix_rand.c and win_rand.c are included by sysrand.c. 826 "nss/lib/freebl/unix_rand.c", 827 "nss/lib/freebl/win_rand.c", 828 # debug_module.c is included by pk11load.c. 829 "nss/lib/pk11wrap/debug_module.c", 830 ] 831 832 configs -= [ 833 "//build/config/compiler:chromium_code" 834 ] 835 if (is_win) { 836 configs -= [ 837 "//build/config/win:unicode", # Requires 8-bit mode. 838 ] 839 } 840 configs += [ "//build/config/compiler:no_chromium_code" ] 841 public_configs = [ ":nss_static_config" ] 842 843 cflags = [] 844 845 # Only need the defines and includes not in nss_static_config. 846 defines = [ 847 "MP_API_COMPATIBLE", 848 "NSS_DISABLE_DBM", 849 "RIJNDAEL_INCLUDE_TABLES", 850 "SHLIB_VERSION=\"3\"", 851 "SOFTOKEN_SHLIB_VERSION=\"3\"", 852 ] 853 include_dirs = [ 854 "nss/lib/freebl/mpi", 855 "nss/lib/ssl", 856 ] 857 858 if (is_win) { 859 cflags += [ 860 "/wd4101", # Unreferenced local variable. 861 "/wd4267", # Conversion from size_t to "type". 862 ] 863 } 864 865 if (include_nss_libpkix) { 866 sources += [ 867 "nss/lib/certhigh/certvfypkix.c", 868 "nss/lib/certhigh/certvfypkixprint.c", 869 "nss/lib/libpkix/include/pkix.h", 870 "nss/lib/libpkix/include/pkix_certsel.h", 871 "nss/lib/libpkix/include/pkix_certstore.h", 872 "nss/lib/libpkix/include/pkix_checker.h", 873 "nss/lib/libpkix/include/pkix_crlsel.h", 874 "nss/lib/libpkix/include/pkix_errorstrings.h", 875 "nss/lib/libpkix/include/pkix_params.h", 876 "nss/lib/libpkix/include/pkix_pl_pki.h", 877 "nss/lib/libpkix/include/pkix_pl_system.h", 878 "nss/lib/libpkix/include/pkix_results.h", 879 "nss/lib/libpkix/include/pkix_revchecker.h", 880 "nss/lib/libpkix/include/pkix_sample_modules.h", 881 "nss/lib/libpkix/include/pkix_util.h", 882 "nss/lib/libpkix/include/pkixt.h", 883 "nss/lib/libpkix/pkix/certsel/pkix_certselector.c", 884 "nss/lib/libpkix/pkix/certsel/pkix_certselector.h", 885 "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c", 886 "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h", 887 "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c", 888 "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h", 889 "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c", 890 "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h", 891 "nss/lib/libpkix/pkix/checker/pkix_crlchecker.c", 892 "nss/lib/libpkix/pkix/checker/pkix_crlchecker.h", 893 "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c", 894 "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h", 895 "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c", 896 "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h", 897 "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c", 898 "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h", 899 "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c", 900 "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h", 901 "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c", 902 "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h", 903 "nss/lib/libpkix/pkix/checker/pkix_policychecker.c", 904 "nss/lib/libpkix/pkix/checker/pkix_policychecker.h", 905 "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c", 906 "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h", 907 "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c", 908 "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h", 909 "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c", 910 "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h", 911 "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c", 912 "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h", 913 "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c", 914 "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h", 915 "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c", 916 "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h", 917 "nss/lib/libpkix/pkix/params/pkix_procparams.c", 918 "nss/lib/libpkix/pkix/params/pkix_procparams.h", 919 "nss/lib/libpkix/pkix/params/pkix_resourcelimits.c", 920 "nss/lib/libpkix/pkix/params/pkix_resourcelimits.h", 921 "nss/lib/libpkix/pkix/params/pkix_trustanchor.c", 922 "nss/lib/libpkix/pkix/params/pkix_trustanchor.h", 923 "nss/lib/libpkix/pkix/params/pkix_valparams.c", 924 "nss/lib/libpkix/pkix/params/pkix_valparams.h", 925 "nss/lib/libpkix/pkix/results/pkix_buildresult.c", 926 "nss/lib/libpkix/pkix/results/pkix_buildresult.h", 927 "nss/lib/libpkix/pkix/results/pkix_policynode.c", 928 "nss/lib/libpkix/pkix/results/pkix_policynode.h", 929 "nss/lib/libpkix/pkix/results/pkix_valresult.c", 930 "nss/lib/libpkix/pkix/results/pkix_valresult.h", 931 "nss/lib/libpkix/pkix/results/pkix_verifynode.c", 932 "nss/lib/libpkix/pkix/results/pkix_verifynode.h", 933 "nss/lib/libpkix/pkix/store/pkix_store.c", 934 "nss/lib/libpkix/pkix/store/pkix_store.h", 935 "nss/lib/libpkix/pkix/top/pkix_build.c", 936 "nss/lib/libpkix/pkix/top/pkix_build.h", 937 "nss/lib/libpkix/pkix/top/pkix_lifecycle.c", 938 "nss/lib/libpkix/pkix/top/pkix_lifecycle.h", 939 "nss/lib/libpkix/pkix/top/pkix_validate.c", 940 "nss/lib/libpkix/pkix/top/pkix_validate.h", 941 "nss/lib/libpkix/pkix/util/pkix_error.c", 942 "nss/lib/libpkix/pkix/util/pkix_error.h", 943 "nss/lib/libpkix/pkix/util/pkix_errpaths.c", 944 "nss/lib/libpkix/pkix/util/pkix_list.c", 945 "nss/lib/libpkix/pkix/util/pkix_list.h", 946 "nss/lib/libpkix/pkix/util/pkix_logger.c", 947 "nss/lib/libpkix/pkix/util/pkix_logger.h", 948 "nss/lib/libpkix/pkix/util/pkix_tools.c", 949 "nss/lib/libpkix/pkix/util/pkix_tools.h", 950 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c", 951 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h", 952 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c", 953 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h", 954 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c", 955 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h", 956 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c", 957 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h", 958 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c", 959 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h", 960 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c", 961 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h", 962 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c", 963 "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h", 964 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c", 965 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h", 966 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c", 967 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h", 968 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c", 969 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h", 970 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c", 971 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h", 972 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c", 973 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h", 974 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c", 975 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h", 976 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c", 977 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h", 978 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c", 979 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h", 980 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c", 981 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h", 982 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c", 983 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h", 984 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c", 985 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h", 986 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c", 987 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h", 988 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c", 989 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h", 990 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c", 991 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h", 992 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c", 993 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h", 994 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c", 995 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h", 996 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c", 997 "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h", 998 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c", 999 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h", 1000 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c", 1001 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h", 1002 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c", 1003 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h", 1004 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c", 1005 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c", 1006 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h", 1007 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c", 1008 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h", 1009 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c", 1010 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h", 1011 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c", 1012 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h", 1013 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c", 1014 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h", 1015 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c", 1016 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h", 1017 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c", 1018 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h", 1019 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c", 1020 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h", 1021 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c", 1022 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h", 1023 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c", 1024 "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h", 1025 ] 1026 1027 # Disable the LDAP code in libpkix. 1028 defines += [ "NSS_PKIX_NO_LDAP" ] 1029 1030 include_dirs += [ 1031 "nss/lib/libpkix/include", 1032 "nss/lib/libpkix/pkix/certsel", 1033 "nss/lib/libpkix/pkix/checker", 1034 "nss/lib/libpkix/pkix/crlsel", 1035 "nss/lib/libpkix/pkix/params", 1036 "nss/lib/libpkix/pkix/results", 1037 "nss/lib/libpkix/pkix/store", 1038 "nss/lib/libpkix/pkix/top", 1039 "nss/lib/libpkix/pkix/util", 1040 "nss/lib/libpkix/pkix_pl_nss/module", 1041 "nss/lib/libpkix/pkix_pl_nss/pki", 1042 "nss/lib/libpkix/pkix_pl_nss/system", 1043 ] 1044 } else { 1045 defines += [ "NSS_DISABLE_LIBPKIX" ] 1046 } 1047 1048 if (!include_nss_root_certs) { 1049 defines += [ "NSS_DISABLE_ROOT_CERTS" ] 1050 } 1051 1052 if (cpu_arch == "x64" && !is_win) { 1053 sources -= [ 1054 "nss/lib/freebl/chacha20/chacha20.c", 1055 "nss/lib/freebl/poly1305/poly1305.c", 1056 ] 1057 } else { 1058 sources -= [ 1059 "nss/lib/freebl/chacha20/chacha20_vec.c", 1060 "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c", 1061 ] 1062 } 1063 1064 if (is_mac || is_ios) { 1065 sources -= [ 1066 "nss/lib/freebl/mpi/mpi_amd64.c", 1067 ] 1068 cflags += [ 1069 "-include", 1070 rebase_path("//third_party/nss/nss/lib/freebl/nss_build_config_mac.h", 1071 root_build_dir), 1072 ] 1073 defines += [ 1074 "XP_UNIX", 1075 "DARWIN", 1076 "HAVE_STRERROR", 1077 "HAVE_BSD_FLOCK", 1078 "SHLIB_SUFFIX=\"dylib\"", 1079 "SHLIB_PREFIX=\"lib\"", 1080 "SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"", 1081 ] 1082 1083 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] 1084 } else { 1085 # Not Mac/iOS. 1086 sources -= [ "nss/lib/freebl/mpi/mpi_arm_mac.c" ] 1087 } 1088 1089 if (is_win) { 1090 defines += [ 1091 "SHLIB_SUFFIX=\"dll\"", 1092 "SHLIB_PREFIX=\"\"", 1093 "SOFTOKEN_LIB_NAME=\"softokn3.dll\"", 1094 "XP_PC", 1095 "WIN32", 1096 "WIN95", 1097 ] 1098 1099 if (cpu_arch == "x86") { 1100 sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ] 1101 defines += [ 1102 "NSS_X86_OR_X64", 1103 "NSS_X86", 1104 "_X86_", 1105 "MP_ASSEMBLY_MULTIPLY", 1106 "MP_ASSEMBLY_SQUARE", 1107 "MP_ASSEMBLY_DIV_2DX1D", 1108 "MP_USE_UINT_DIGIT", 1109 "MP_NO_MP_WORD", 1110 "USE_HW_AES", 1111 "INTEL_GCM", 1112 ] 1113 } else if (cpu_arch == "x64") { 1114 sources -= [ "nss/lib/freebl/mpi/mpi_x86_asm.c" ] 1115 defines += [ 1116 "NSS_USE_64", 1117 "NSS_X86_OR_X64", 1118 "NSS_X64", 1119 "_AMD64_", 1120 "MP_CHAR_STORE_SLOW", 1121 "MP_IS_LITTLE_ENDIAN", 1122 "WIN64", 1123 ] 1124 } 1125 } else { 1126 # Not Windows. 1127 sources -= [ 1128 # mpi_x86_asm.c contains MSVC inline assembly code. 1129 "nss/lib/freebl/mpi/mpi_x86_asm.c", 1130 ] 1131 } 1132 1133 if (is_clang) { 1134 cflags += [ 1135 # nss doesn"t explicitly cast between different enum types. 1136 "-Wno-conversion", 1137 # nss passes "const char*" through "void*". 1138 "-Wno-incompatible-pointer-types", 1139 # nss prefers `a && b || c` over `(a && b) || c`. 1140 "-Wno-logical-op-parentheses", 1141 # nss doesn"t use exhaustive switches on enums 1142 "-Wno-switch", 1143 # nss has some `unsigned < 0` checks. 1144 "-Wno-tautological-compare", 1145 ] 1146 } 1147 1148 public_deps = [ 1149 ":nspr", 1150 ] 1151 deps = [ 1152 ":nspr", 1153 "//third_party/sqlite", 1154 ] 1155 } 1156 } # Windows/Mac/iOS. 1157 1158