summaryrefslogtreecommitdiffstats
path: root/crypto/crypto.gyp
diff options
context:
space:
mode:
authordavidben <davidben@chromium.org>2015-05-01 08:35:56 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-01 15:36:27 +0000
commita46a990b2ccae2b66e87b5f76d2866044dc3182e (patch)
treef0102746c81371d47dc304c401dc414ee5a570a9 /crypto/crypto.gyp
parentb847f7bb3b352907f617db6896bca0d3489ccfb4 (diff)
downloadchromium_src-a46a990b2ccae2b66e87b5f76d2866044dc3182e.zip
chromium_src-a46a990b2ccae2b66e87b5f76d2866044dc3182e.tar.gz
chromium_src-a46a990b2ccae2b66e87b5f76d2866044dc3182e.tar.bz2
Don't use RSAPrivateKey in NSS integration code.
Currently some NSS platform integration logic transits private keys through RSAPrivateKey on CrOS. This prevents incrementally switching RSAPrivateKey to BoringSSL while keeping platform integrations on NSS. The intent of this change is to clarify RSAPrivateKey as a BoringSSL vs NSS internal crypto library (use_openssl=0 vs use_openssl=1) abstraction. It's primarily to be used with SignatureCreator. Code which uses NSS based on use_nss_certs rather than use_openssl because the underlying platform is NSS should call NSS routines directly, or introduce different abstractions. Remove the problematic RSAPrivateKey methods and instead add crypto/nss_key_util.h which contains some helper functions for manipulating NSS keys. This is sufficient to allow consumers of the removed methods to use NSS directly with about as much code. (This should not set back migrating that logic to NSS as that code was already very NSS-specific; those APIs assumed PK11SlotInfo.) nss_key_util.h, like nss_util.h, is built whenever NSS is used either internally or for platform integrations. This is so rsa_private_key_nss.cc can continue to use the helper functions to implement the NSS-agnostic interface. With this, the chimera CrOS configuration should build. The RSAPrivateKey logic is functional with the exception of some logic in components/ownership. That will be resolved in a future CL. BUG=478777 Review URL: https://codereview.chromium.org/1106103003 Cr-Commit-Position: refs/heads/master@{#327909}
Diffstat (limited to 'crypto/crypto.gyp')
-rw-r--r--crypto/crypto.gyp16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/crypto.gyp b/crypto/crypto.gyp
index 00b59b5..e6bff0b 100644
--- a/crypto/crypto.gyp
+++ b/crypto/crypto.gyp
@@ -143,9 +143,11 @@
],
},],
[ 'use_openssl==1 and use_nss_certs==0', {
- # NSS is used for neither the internal crypto library nor the
- # platform certificate library.
+ # Some files are built when NSS is used at all, either for the
+ # internal crypto library or the platform certificate library.
'sources!': [
+ 'nss_key_util.cc',
+ 'nss_key_util.h',
'nss_util.cc',
'nss_util.h',
'nss_util_internal.h',
@@ -168,13 +170,13 @@
'ghash_unittest.cc',
'hkdf_unittest.cc',
'hmac_unittest.cc',
+ 'nss_key_util_unittest.cc',
'nss_util_unittest.cc',
'openssl_bio_string_unittest.cc',
'p224_unittest.cc',
'p224_spake_unittest.cc',
'random_unittest.cc',
'rsa_private_key_unittest.cc',
- 'rsa_private_key_nss_unittest.cc',
'secure_hash_unittest.cc',
'sha2_unittest.cc',
'signature_creator_unittest.cc',
@@ -205,9 +207,10 @@
],
}],
[ 'use_openssl == 1 and use_nss_certs == 0', {
- # nss_util is built if NSS is used for either the internal crypto
- # library or the platform certificate library.
+ # Some files are built when NSS is used at all, either for the
+ # internal crypto library or the platform certificate library.
'sources!': [
+ 'nss_key_util_unittest.cc',
'nss_util_unittest.cc',
],
}],
@@ -224,9 +227,6 @@
'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
],
- 'sources!': [
- 'rsa_private_key_nss_unittest.cc',
- ],
}, {
'sources!': [
'openssl_bio_string_unittest.cc',