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 <cryptohi.h> | 5 #include <cryptohi.h> |
6 #include <keyhi.h> | 6 #include <keyhi.h> |
7 #include <pk11pub.h> | 7 #include <pk11pub.h> |
8 #include <secerr.h> | 8 #include <secerr.h> |
9 #include <sechash.h> | 9 #include <sechash.h> |
10 | 10 |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "content/child/webcrypto/crypto_data.h" | 12 #include "components/webcrypto/crypto_data.h" |
13 #include "content/child/webcrypto/nss/key_nss.h" | 13 #include "components/webcrypto/nss/key_nss.h" |
14 #include "content/child/webcrypto/nss/rsa_hashed_algorithm_nss.h" | 14 #include "components/webcrypto/nss/rsa_hashed_algorithm_nss.h" |
15 #include "content/child/webcrypto/nss/util_nss.h" | 15 #include "components/webcrypto/nss/util_nss.h" |
16 #include "content/child/webcrypto/status.h" | 16 #include "components/webcrypto/status.h" |
17 #include "content/child/webcrypto/webcrypto_util.h" | 17 #include "components/webcrypto/webcrypto_util.h" |
18 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 18 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
19 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 19 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
20 | 20 |
21 namespace content { | |
22 | |
23 namespace webcrypto { | 21 namespace webcrypto { |
24 | 22 |
25 namespace { | 23 namespace { |
26 | 24 |
27 Status NssSupportsRsaOaep() { | 25 Status NssSupportsRsaOaep() { |
28 if (NssRuntimeSupport::Get()->IsRsaOaepSupported()) | 26 if (NssRuntimeSupport::Get()->IsRsaOaepSupported()) |
29 return Status::Success(); | 27 return Status::Success(); |
30 return Status::ErrorUnsupported( | 28 return Status::ErrorUnsupported( |
31 "NSS version doesn't support RSA-OAEP. Try using version 3.16.2 or " | 29 "NSS version doesn't support RSA-OAEP. Try using version 3.16.2 or " |
32 "later"); | 30 "later"); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 218 } |
221 }; | 219 }; |
222 | 220 |
223 } // namespace | 221 } // namespace |
224 | 222 |
225 AlgorithmImplementation* CreatePlatformRsaOaepImplementation() { | 223 AlgorithmImplementation* CreatePlatformRsaOaepImplementation() { |
226 return new RsaOaepImplementation; | 224 return new RsaOaepImplementation; |
227 } | 225 } |
228 | 226 |
229 } // namespace webcrypto | 227 } // namespace webcrypto |
230 | |
231 } // namespace content | |
OLD | NEW |