OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/webcrypto/nss/util_nss.h" | 5 #include "components/webcrypto/nss/util_nss.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "content/child/webcrypto/crypto_data.h" | 8 #include "components/webcrypto/crypto_data.h" |
9 #include "content/child/webcrypto/platform_crypto.h" | 9 #include "components/webcrypto/platform_crypto.h" |
10 #include "crypto/nss_util.h" | 10 #include "crypto/nss_util.h" |
11 #include "crypto/scoped_nss_types.h" | 11 #include "crypto/scoped_nss_types.h" |
12 | 12 |
13 #if defined(USE_NSS) | 13 #if defined(USE_NSS) |
14 #include <dlfcn.h> | 14 #include <dlfcn.h> |
15 #include <secoid.h> | 15 #include <secoid.h> |
16 #endif | 16 #endif |
17 | 17 |
18 namespace content { | 18 namespace components { |
19 | 19 |
20 namespace webcrypto { | 20 namespace webcrypto { |
21 | 21 |
22 namespace { | 22 namespace { |
23 base::LazyInstance<NssRuntimeSupport>::Leaky g_nss_runtime_support = | 23 base::LazyInstance<NssRuntimeSupport>::Leaky g_nss_runtime_support = |
24 LAZY_INSTANCE_INITIALIZER; | 24 LAZY_INSTANCE_INITIALIZER; |
25 } // namespace | 25 } // namespace |
26 | 26 |
27 // Creates a SECItem for the data in |buffer|. This does NOT make a copy, so | 27 // Creates a SECItem for the data in |buffer|. This does NOT make a copy, so |
28 // |buffer| should outlive the SECItem. | 28 // |buffer| should outlive the SECItem. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 AlgorithmImplementation* CreatePlatformPbkdf2Implementation() { | 109 AlgorithmImplementation* CreatePlatformPbkdf2Implementation() { |
110 // PBKDF2 will only be implemented for BoringSSL, since the NSS | 110 // PBKDF2 will only be implemented for BoringSSL, since the NSS |
111 // implementation is being deprecated. | 111 // implementation is being deprecated. |
112 return NULL; | 112 return NULL; |
113 } | 113 } |
114 | 114 |
115 } // namespace webcrypto | 115 } // namespace webcrypto |
116 | 116 |
117 } // namespace content | 117 } // namespace components |
OLD | NEW |