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
This commit is contained in:
@ -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);
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user