| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "crypto/nss_util.h" | 5 #include "crypto/nss_util.h" | 
| 6 #include "crypto/nss_util_internal.h" | 6 #include "crypto/nss_util_internal.h" | 
| 7 | 7 | 
| 8 #include <nss.h> | 8 #include <nss.h> | 
| 9 #include <pk11pub.h> | 9 #include <pk11pub.h> | 
| 10 #include <plarena.h> | 10 #include <plarena.h> | 
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 652 | 652 | 
| 653     // It's safe to construct on any thread, since LazyInstance will prevent any | 653     // It's safe to construct on any thread, since LazyInstance will prevent any | 
| 654     // other threads from accessing until the constructor is done. | 654     // other threads from accessing until the constructor is done. | 
| 655     thread_checker_.DetachFromThread(); | 655     thread_checker_.DetachFromThread(); | 
| 656 | 656 | 
| 657     DisableAESNIIfNeeded(); | 657     DisableAESNIIfNeeded(); | 
| 658 | 658 | 
| 659     EnsureNSPRInit(); | 659     EnsureNSPRInit(); | 
| 660 | 660 | 
| 661     // We *must* have NSS >= 3.14.3. | 661     // We *must* have NSS >= 3.14.3. | 
| 662     COMPILE_ASSERT( | 662     static_assert( | 
| 663         (NSS_VMAJOR == 3 && NSS_VMINOR == 14 && NSS_VPATCH >= 3) || | 663         (NSS_VMAJOR == 3 && NSS_VMINOR == 14 && NSS_VPATCH >= 3) || | 
| 664         (NSS_VMAJOR == 3 && NSS_VMINOR > 14) || | 664         (NSS_VMAJOR == 3 && NSS_VMINOR > 14) || | 
| 665         (NSS_VMAJOR > 3), | 665         (NSS_VMAJOR > 3), | 
| 666         nss_version_check_failed); | 666         "nss version check failed"); | 
| 667     // Also check the run-time NSS version. | 667     // Also check the run-time NSS version. | 
| 668     // NSS_VersionCheck is a >= check, not strict equality. | 668     // NSS_VersionCheck is a >= check, not strict equality. | 
| 669     if (!NSS_VersionCheck("3.14.3")) { | 669     if (!NSS_VersionCheck("3.14.3")) { | 
| 670       LOG(FATAL) << "NSS_VersionCheck(\"3.14.3\") failed. NSS >= 3.14.3 is " | 670       LOG(FATAL) << "NSS_VersionCheck(\"3.14.3\") failed. NSS >= 3.14.3 is " | 
| 671                     "required. Please upgrade to the latest NSS, and if you " | 671                     "required. Please upgrade to the latest NSS, and if you " | 
| 672                     "still get this error, contact your distribution " | 672                     "still get this error, contact your distribution " | 
| 673                     "maintainer."; | 673                     "maintainer."; | 
| 674     } | 674     } | 
| 675 | 675 | 
| 676     SECStatus status = SECFailure; | 676     SECStatus status = SECFailure; | 
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1096   return time.ToInternalValue() - base::Time::UnixEpoch().ToInternalValue(); | 1096   return time.ToInternalValue() - base::Time::UnixEpoch().ToInternalValue(); | 
| 1097 } | 1097 } | 
| 1098 | 1098 | 
| 1099 #if !defined(OS_CHROMEOS) | 1099 #if !defined(OS_CHROMEOS) | 
| 1100 PK11SlotInfo* GetPersistentNSSKeySlot() { | 1100 PK11SlotInfo* GetPersistentNSSKeySlot() { | 
| 1101   return g_nss_singleton.Get().GetPersistentNSSKeySlot(); | 1101   return g_nss_singleton.Get().GetPersistentNSSKeySlot(); | 
| 1102 } | 1102 } | 
| 1103 #endif | 1103 #endif | 
| 1104 | 1104 | 
| 1105 }  // namespace crypto | 1105 }  // namespace crypto | 
| OLD | NEW | 
|---|