diff options
author | svaldez <svaldez@chromium.org> | 2016-03-18 13:47:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 20:50:26 +0000 |
commit | a1714ab3703201b3a3c424fa42788f0e4d060b26 (patch) | |
tree | 913fbf63f036b0dae8494dc500c03ff6bc3aaf82 /build | |
parent | 1d492be0508e1638a37ac6a156d16e9f724da69c (diff) | |
download | chromium_src-a1714ab3703201b3a3c424fa42788f0e4d060b26.zip chromium_src-a1714ab3703201b3a3c424fa42788f0e4d060b26.tar.gz chromium_src-a1714ab3703201b3a3c424fa42788f0e4d060b26.tar.bz2 |
Adding macro to enable changing SSL library (Part 1)
This changes the macro used to be USE_NSS_VERIFIER and modifies build
files to no longer assume iOS is using NSS.
BUG=591545
Review URL: https://codereview.chromium.org/1808963004
Cr-Commit-Position: refs/heads/master@{#382077}
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 16 | ||||
-rw-r--r-- | build/config/BUILD.gn | 3 | ||||
-rw-r--r-- | build/config/crypto.gni | 11 |
3 files changed, 27 insertions, 3 deletions
diff --git a/build/common.gypi b/build/common.gypi index 3289014..400081b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -741,6 +741,15 @@ 'use_nss_certs%': 0, }], + # NSS verifier usage. + # On non-OpenSSL iOS configurations, certificates use the operating + # system library, but the verifier uses the bundled copy of NSS. + ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") or (OS=="ios" and use_openssl==0)', { + 'use_nss_verifier%': 1, + }, { + 'use_nss_verifier%': 0, + }], + # libudev usage. This currently only affects the content layer. ['OS=="linux" and embedded==0', { 'use_udev%': 1, @@ -1153,6 +1162,7 @@ 'use_openssl%': '<(use_openssl)', 'use_openssl_certs%': '<(use_openssl_certs)', 'use_nss_certs%': '<(use_nss_certs)', + 'use_nss_verifier%': '<(use_nss_verifier)', 'use_udev%': '<(use_udev)', 'os_bsd%': '<(os_bsd)', 'os_posix%': '<(os_posix)', @@ -2125,6 +2135,9 @@ ['use_nss_certs==1', { 'grit_defines': ['-D', 'use_nss_certs'], }], + ['use_nss_verifier==1', { + 'grit_defines': ['-D', 'use_nss_verifier'], + }], ['use_ozone==1', { 'grit_defines': ['-D', 'use_ozone'], }], @@ -3086,6 +3099,9 @@ ['<(use_nss_certs)==1 and >(nacl_untrusted_build)==0', { 'defines': ['USE_NSS_CERTS=1'], }], + ['<(use_nss_verifier)==1 and >(nacl_untrusted_build)==0', { + 'defines': ['USE_NSS_VERIFIER=1'], + }], ['<(chromeos)==1 and >(nacl_untrusted_build)==0', { 'defines': ['OS_CHROMEOS=1'], }], diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index cfa910d..dca62fd 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -128,6 +128,9 @@ config("feature_flags") { if (use_nss_certs) { defines += [ "USE_NSS_CERTS=1" ] } + if (use_nss_verifier) { + defines += [ "USE_NSS_VERIFIER=1" ] + } if (use_ozone) { defines += [ "USE_OZONE=1" ] } diff --git a/build/config/crypto.gni b/build/config/crypto.gni index 99ce428..7d671cf 100644 --- a/build/config/crypto.gni +++ b/build/config/crypto.gni @@ -24,7 +24,12 @@ declare_args() { # is unsupported. use_openssl_certs = is_android || is_nacl -# True if NSS is used for certificate verification. Note that this is -# independent from use_openssl. It is possible to use OpenSSL for the crypto -# library, but NSS for the platform certificate library. +# True if NSS is used for certificate handling. Note that this is independent +# from use_openssl. It is possible to use OpenSSL for the crypto library, but +# NSS for the platform certificate library. use_nss_certs = is_linux + +# True if NSS is used for certificate verification. On non-OpenSSL iOS +# configurations, certificates use the operating system library, but the +# verifier uses the bundled copy of NSS. +use_nss_verifier = use_nss_certs || (is_ios && !use_openssl) |