diff options
author | msarda@chromium.org <msarda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-14 19:46:28 +0000 |
---|---|---|
committer | msarda@chromium.org <msarda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-14 19:46:28 +0000 |
commit | a88f87ece75b6b4888aee98693186f900e006130 (patch) | |
tree | 05c49cbcc3101fcc3abd22e3630dd6a82a3f6dbb /crypto | |
parent | 009adbf3ab48d12009ee03d474dae7b455b3e0b5 (diff) | |
download | chromium_src-a88f87ece75b6b4888aee98693186f900e006130.zip chromium_src-a88f87ece75b6b4888aee98693186f900e006130.tar.gz chromium_src-a88f87ece75b6b4888aee98693186f900e006130.tar.bz2 |
Upstream minor iOS crypto diffs.
This CL upstreams two minor changes of crypto for iOS:
* nss_util.cc: On iOS, the default NSS root certificates need to be initialized when no persistent database is used.
* symmetric_key_unittest.cc: Turn off an OS X-specific code path for iOS.
Review URL: https://chromiumcodereview.appspot.com/10831307
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/nss_util.cc | 5 | ||||
-rw-r--r-- | crypto/symmetric_key_unittest.cc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 8b62294..db89a70 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -452,6 +452,9 @@ class NSSInitSingleton { LOG(ERROR) << "Error initializing NSS without a persistent " "database: " << GetNSSErrorMessage(); } +#if defined(OS_IOS) + root_ = InitDefaultRootCerts(); +#endif // defined(OS_IOS) } else { #if defined(USE_NSS) FilePath database_dir = GetInitialConfigDirectory(); @@ -538,7 +541,7 @@ class NSSInitSingleton { } } -#if defined(USE_NSS) +#if defined(USE_NSS) || defined(OS_IOS) // Load nss's built-in root certs. SECMODModule* InitDefaultRootCerts() { SECMODModule* root = LoadModule("Root Certs", "libnssckbi.so", NULL); diff --git a/crypto/symmetric_key_unittest.cc b/crypto/symmetric_key_unittest.cc index a07194e..389d7f5 100644 --- a/crypto/symmetric_key_unittest.cc +++ b/crypto/symmetric_key_unittest.cc @@ -80,7 +80,7 @@ class SymmetricKeyDeriveKeyFromPasswordTest TEST_P(SymmetricKeyDeriveKeyFromPasswordTest, DeriveKeyFromPassword) { PBKDF2TestVector test_data(GetParam()); -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) && !defined(OS_IOS) // The OS X crypto libraries have minimum salt and iteration requirements // so some of the tests below will cause them to barf. Skip these. if (strlen(test_data.salt) < 8 || test_data.rounds < 1000) { |