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 { | |
19 | |
20 namespace webcrypto { | 18 namespace webcrypto { |
21 | 19 |
22 namespace { | 20 namespace { |
23 base::LazyInstance<NssRuntimeSupport>::Leaky g_nss_runtime_support = | 21 base::LazyInstance<NssRuntimeSupport>::Leaky g_nss_runtime_support = |
24 LAZY_INSTANCE_INITIALIZER; | 22 LAZY_INSTANCE_INITIALIZER; |
25 } // namespace | 23 } // namespace |
26 | 24 |
27 // Creates a SECItem for the data in |buffer|. This does NOT make a copy, so | 25 // Creates a SECItem for the data in |buffer|. This does NOT make a copy, so |
28 // |buffer| should outlive the SECItem. | 26 // |buffer| should outlive the SECItem. |
29 SECItem MakeSECItemForBuffer(const CryptoData& buffer) { | 27 SECItem MakeSECItemForBuffer(const CryptoData& buffer) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return NULL; | 104 return NULL; |
107 } | 105 } |
108 | 106 |
109 AlgorithmImplementation* CreatePlatformPbkdf2Implementation() { | 107 AlgorithmImplementation* CreatePlatformPbkdf2Implementation() { |
110 // PBKDF2 will only be implemented for BoringSSL, since the NSS | 108 // PBKDF2 will only be implemented for BoringSSL, since the NSS |
111 // implementation is being deprecated. | 109 // implementation is being deprecated. |
112 return NULL; | 110 return NULL; |
113 } | 111 } |
114 | 112 |
115 } // namespace webcrypto | 113 } // namespace webcrypto |
116 | |
117 } // namespace content | |
OLD | NEW |