OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/socket/nss_ssl_util.h" | 5 #include "net/socket/nss_ssl_util.h" |
6 | 6 |
7 #include <nss.h> | 7 #include <nss.h> |
8 #include <secerr.h> | 8 #include <secerr.h> |
9 #include <ssl.h> | 9 #include <ssl.h> |
10 #include <sslerr.h> | 10 #include <sslerr.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
17 #include "base/nss_util.h" | |
18 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
19 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "crypto/nss_util.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 | 24 |
25 class NSSSSLInitSingleton { | 25 class NSSSSLInitSingleton { |
26 public: | 26 public: |
27 NSSSSLInitSingleton() { | 27 NSSSSLInitSingleton() { |
28 base::EnsureNSSInit(); | 28 crypto::EnsureNSSInit(); |
29 | 29 |
30 NSS_SetDomesticPolicy(); | 30 NSS_SetDomesticPolicy(); |
31 | 31 |
32 #if defined(USE_SYSTEM_SSL) | 32 #if defined(USE_SYSTEM_SSL) |
33 // Use late binding to avoid scary but benign warning | 33 // Use late binding to avoid scary but benign warning |
34 // "Symbol `SSL_ImplementedCiphers' has different size in shared object, | 34 // "Symbol `SSL_ImplementedCiphers' has different size in shared object, |
35 // consider re-linking" | 35 // consider re-linking" |
36 // TODO(wtc): Use the new SSL_GetImplementedCiphers and | 36 // TODO(wtc): Use the new SSL_GetImplementedCiphers and |
37 // SSL_GetNumImplementedCiphers functions when we require NSS 3.12.6. | 37 // SSL_GetNumImplementedCiphers functions when we require NSS 3.12.6. |
38 // See https://bugzilla.mozilla.org/show_bug.cgi?id=496993. | 38 // See https://bugzilla.mozilla.org/show_bug.cgi?id=496993. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void LogFailedNSSFunction(const BoundNetLog& net_log, | 239 void LogFailedNSSFunction(const BoundNetLog& net_log, |
240 const char* function, | 240 const char* function, |
241 const char* param) { | 241 const char* param) { |
242 net_log.AddEvent( | 242 net_log.AddEvent( |
243 NetLog::TYPE_SSL_NSS_ERROR, | 243 NetLog::TYPE_SSL_NSS_ERROR, |
244 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); | 244 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); |
245 } | 245 } |
246 | 246 |
247 } // namespace net | 247 } // namespace net |
OLD | NEW |