| 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 | 6 |
| 7 #include <nss.h> | 7 #include <nss.h> |
| 8 #include <pk11pub.h> | 8 #include <pk11pub.h> |
| 9 #include <plarena.h> | 9 #include <plarena.h> |
| 10 #include <prerror.h> | 10 #include <prerror.h> |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 NSS_SetAlgorithmPolicy(SEC_OID_MD5, 0, NSS_USE_ALG_IN_CERT_SIGNATURE); | 745 NSS_SetAlgorithmPolicy(SEC_OID_MD5, 0, NSS_USE_ALG_IN_CERT_SIGNATURE); |
| 746 NSS_SetAlgorithmPolicy(SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION, | 746 NSS_SetAlgorithmPolicy(SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION, |
| 747 0, NSS_USE_ALG_IN_CERT_SIGNATURE); | 747 0, NSS_USE_ALG_IN_CERT_SIGNATURE); |
| 748 } | 748 } |
| 749 | 749 |
| 750 // NOTE(willchan): We don't actually execute this code since we leak NSS to | 750 // NOTE(willchan): We don't actually execute this code since we leak NSS to |
| 751 // prevent non-joinable threads from using NSS after it's already been shut | 751 // prevent non-joinable threads from using NSS after it's already been shut |
| 752 // down. | 752 // down. |
| 753 ~NSSInitSingleton() { | 753 ~NSSInitSingleton() { |
| 754 #if defined(OS_CHROMEOS) | 754 #if defined(OS_CHROMEOS) |
| 755 STLDeleteValues(&chromeos_user_map_); | 755 base::STLDeleteValues(&chromeos_user_map_); |
| 756 #endif | 756 #endif |
| 757 tpm_slot_.reset(); | 757 tpm_slot_.reset(); |
| 758 if (root_) { | 758 if (root_) { |
| 759 SECMOD_UnloadUserModule(root_); | 759 SECMOD_UnloadUserModule(root_); |
| 760 SECMOD_DestroyModule(root_); | 760 SECMOD_DestroyModule(root_); |
| 761 root_ = nullptr; | 761 root_ = nullptr; |
| 762 } | 762 } |
| 763 if (chaps_module_) { | 763 if (chaps_module_) { |
| 764 SECMOD_UnloadUserModule(chaps_module_); | 764 SECMOD_UnloadUserModule(chaps_module_); |
| 765 SECMOD_DestroyModule(chaps_module_); | 765 SECMOD_DestroyModule(chaps_module_); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 return time.ToInternalValue() - base::Time::UnixEpoch().ToInternalValue(); | 983 return time.ToInternalValue() - base::Time::UnixEpoch().ToInternalValue(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 #if !defined(OS_CHROMEOS) | 986 #if !defined(OS_CHROMEOS) |
| 987 PK11SlotInfo* GetPersistentNSSKeySlot() { | 987 PK11SlotInfo* GetPersistentNSSKeySlot() { |
| 988 return g_nss_singleton.Get().GetPersistentNSSKeySlot(); | 988 return g_nss_singleton.Get().GetPersistentNSSKeySlot(); |
| 989 } | 989 } |
| 990 #endif | 990 #endif |
| 991 | 991 |
| 992 } // namespace crypto | 992 } // namespace crypto |
| OLD | NEW |