| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ssl/ssl_platform_key.h" | 5 #include "net/ssl/ssl_platform_key.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <NCrypt.h> | 8 #include <NCrypt.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/sequenced_task_runner.h" | |
| 18 #include "crypto/openssl_util.h" | 17 #include "crypto/openssl_util.h" |
| 19 #include "crypto/scoped_capi_types.h" | 18 #include "crypto/scoped_capi_types.h" |
| 20 #include "crypto/wincrypt_shim.h" | 19 #include "crypto/wincrypt_shim.h" |
| 21 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
| 22 #include "net/cert/x509_certificate.h" | 21 #include "net/cert/x509_certificate.h" |
| 23 #include "net/ssl/ssl_platform_key_util.h" | 22 #include "net/ssl/ssl_platform_key_util.h" |
| 24 #include "net/ssl/ssl_private_key.h" | 23 #include "net/ssl/ssl_private_key.h" |
| 25 #include "net/ssl/threaded_ssl_private_key.h" | 24 #include "net/ssl/threaded_ssl_private_key.h" |
| 26 #include "third_party/boringssl/src/include/openssl/bn.h" | 25 #include "third_party/boringssl/src/include/openssl/bn.h" |
| 27 #include "third_party/boringssl/src/include/openssl/ecdsa.h" | 26 #include "third_party/boringssl/src/include/openssl/ecdsa.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); | 279 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); |
| 281 } else { | 280 } else { |
| 282 DCHECK(SSLPrivateKey::Type::RSA == key_type); | 281 DCHECK(SSLPrivateKey::Type::RSA == key_type); |
| 283 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); | 282 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); |
| 284 } | 283 } |
| 285 return make_scoped_refptr(new ThreadedSSLPrivateKey( | 284 return make_scoped_refptr(new ThreadedSSLPrivateKey( |
| 286 std::move(delegate), GetSSLPlatformKeyTaskRunner())); | 285 std::move(delegate), GetSSLPlatformKeyTaskRunner())); |
| 287 } | 286 } |
| 288 | 287 |
| 289 } // namespace net | 288 } // namespace net |
| OLD | NEW |