| 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/rsa_hashed_algorithm_nss.h" | 5 #include "components/webcrypto/nss/rsa_hashed_algorithm_nss.h" |
| 6 | 6 |
| 7 #include <secasn1.h> | 7 #include <secasn1.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/child/webcrypto/crypto_data.h" | 10 #include "components/webcrypto/crypto_data.h" |
| 11 #include "content/child/webcrypto/generate_key_result.h" | 11 #include "components/webcrypto/generate_key_result.h" |
| 12 #include "content/child/webcrypto/jwk.h" | 12 #include "components/webcrypto/jwk.h" |
| 13 #include "content/child/webcrypto/nss/key_nss.h" | 13 #include "components/webcrypto/nss/key_nss.h" |
| 14 #include "content/child/webcrypto/nss/util_nss.h" | 14 #include "components/webcrypto/nss/util_nss.h" |
| 15 #include "content/child/webcrypto/status.h" | 15 #include "components/webcrypto/status.h" |
| 16 #include "content/child/webcrypto/webcrypto_util.h" | 16 #include "components/webcrypto/webcrypto_util.h" |
| 17 #include "crypto/scoped_nss_types.h" | 17 #include "crypto/scoped_nss_types.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 { | 21 namespace components { |
| 22 | 22 |
| 23 namespace webcrypto { | 23 namespace webcrypto { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 #if defined(USE_NSS) && !defined(OS_CHROMEOS) | 27 #if defined(USE_NSS) && !defined(OS_CHROMEOS) |
| 28 Status ErrorRsaPrivateKeyImportNotSupported() { | 28 Status ErrorRsaPrivateKeyImportNotSupported() { |
| 29 return Status::ErrorUnsupported( | 29 return Status::ErrorUnsupported( |
| 30 "NSS version must be at least 3.16.2 for RSA private key import. See " | 30 "NSS version must be at least 3.16.2 for RSA private key import. See " |
| 31 "http://crbug.com/380424"); | 31 "http://crbug.com/380424"); |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 key->algorithm().rsaHashedParams()->publicExponent().data(), | 852 key->algorithm().rsaHashedParams()->publicExponent().data(), |
| 853 key->algorithm().rsaHashedParams()->publicExponent().size())) { | 853 key->algorithm().rsaHashedParams()->publicExponent().size())) { |
| 854 return Status::ErrorUnexpected(); | 854 return Status::ErrorUnexpected(); |
| 855 } | 855 } |
| 856 | 856 |
| 857 return Status::Success(); | 857 return Status::Success(); |
| 858 } | 858 } |
| 859 | 859 |
| 860 } // namespace webcrypto | 860 } // namespace webcrypto |
| 861 | 861 |
| 862 } // namespace content | 862 } // namespace thing |
| OLD | NEW |