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> |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 CHECK_EQ(must_free, TRUE); | 349 CHECK_EQ(must_free, TRUE); |
350 | 350 |
351 std::unique_ptr<ThreadedSSLPrivateKey::Delegate> delegate; | 351 std::unique_ptr<ThreadedSSLPrivateKey::Delegate> delegate; |
352 if (key_spec == CERT_NCRYPT_KEY_SPEC) { | 352 if (key_spec == CERT_NCRYPT_KEY_SPEC) { |
353 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); | 353 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); |
354 } else { | 354 } else { |
355 DCHECK(SSLPrivateKey::Type::RSA == key_type); | 355 DCHECK(SSLPrivateKey::Type::RSA == key_type); |
356 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); | 356 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); |
357 } | 357 } |
358 return make_scoped_refptr(new ThreadedSSLPrivateKey( | 358 return make_scoped_refptr(new ThreadedSSLPrivateKey( |
359 std::move(delegate), GetSSLPlatformKeyTaskRunner())); | 359 std::move(delegate), SSLPlatformKeyTaskRunner::Get())); |
360 } | 360 } |
361 | 361 |
362 } // namespace net | 362 } // namespace net |
OLD | NEW |