OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef BASE_CRYPTO_CSSM_INIT_H_ | 5 #ifndef BASE_CRYPTO_CSSM_INIT_H_ |
6 #define BASE_CRYPTO_CSSM_INIT_H_ | 6 #define BASE_CRYPTO_CSSM_INIT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <Security/cssm.h> | 9 #include <Security/cssm.h> |
10 | 10 |
11 #include "base/logging.h" | |
12 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
13 | 12 |
14 class Lock; | 13 class Lock; |
15 | 14 |
16 namespace base { | 15 namespace base { |
17 | 16 |
18 // Initialize CSSM if it isn't already initialized. This must be called before | 17 // Initialize CSSM if it isn't already initialized. This must be called before |
19 // any other CSSM functions. This function is thread-safe, and CSSM will only | 18 // any other CSSM functions. This function is thread-safe, and CSSM will only |
20 // ever be initialized once. CSSM will be properly shut down on program exit. | 19 // ever be initialized once. CSSM will be properly shut down on program exit. |
21 void EnsureCSSMInit(); | 20 void EnsureCSSMInit(); |
(...skipping 10 matching lines...) Expand all Loading... |
32 // The OS X certificate and key management wrappers over CSSM are not | 31 // The OS X certificate and key management wrappers over CSSM are not |
33 // thread-safe. In particular, code that accesses the CSSM database is | 32 // thread-safe. In particular, code that accesses the CSSM database is |
34 // problematic. | 33 // problematic. |
35 // | 34 // |
36 // http://developer.apple.com/mac/library/documentation/Security/Reference/certi
fkeytrustservices/Reference/reference.html | 35 // http://developer.apple.com/mac/library/documentation/Security/Reference/certi
fkeytrustservices/Reference/reference.html |
37 Lock& GetMacSecurityServicesLock(); | 36 Lock& GetMacSecurityServicesLock(); |
38 | 37 |
39 } // namespace base | 38 } // namespace base |
40 | 39 |
41 #endif // BASE_CRYPTO_CSSM_INIT_H_ | 40 #endif // BASE_CRYPTO_CSSM_INIT_H_ |
OLD | NEW |