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 <cert.h> | 5 #include <cert.h> |
6 #include <keyhi.h> | 6 #include <keyhi.h> |
7 #include <openssl/bn.h> | 7 #include <openssl/bn.h> |
8 #include <openssl/bytestring.h> | 8 #include <openssl/bytestring.h> |
9 #include <openssl/ec.h> | 9 #include <openssl/ec.h> |
10 #include <openssl/ec_key.h> | 10 #include <openssl/ec_key.h> |
11 #include <openssl/ecdsa.h> | 11 #include <openssl/ecdsa.h> |
12 #include <openssl/mem.h> | 12 #include <openssl/mem.h> |
13 #include <openssl/nid.h> | 13 #include <openssl/nid.h> |
14 #include <openssl/rsa.h> | 14 #include <openssl/rsa.h> |
15 #include <pk11pub.h> | 15 #include <pk11pub.h> |
16 #include <prerror.h> | 16 #include <prerror.h> |
17 | 17 |
18 #include <utility> | 18 #include <utility> |
19 | 19 |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/macros.h" | 21 #include "base/macros.h" |
22 #include "base/memory/ptr_util.h" | 22 #include "base/memory/ptr_util.h" |
23 #include "base/sequenced_task_runner.h" | |
24 #include "crypto/scoped_nss_types.h" | 23 #include "crypto/scoped_nss_types.h" |
25 #include "net/cert/x509_certificate.h" | 24 #include "net/cert/x509_certificate.h" |
26 #include "net/ssl/client_key_store.h" | 25 #include "net/ssl/client_key_store.h" |
27 #include "net/ssl/ssl_platform_key.h" | 26 #include "net/ssl/ssl_platform_key.h" |
28 #include "net/ssl/ssl_platform_key_util.h" | 27 #include "net/ssl/ssl_platform_key_util.h" |
29 #include "net/ssl/ssl_private_key.h" | 28 #include "net/ssl/ssl_private_key.h" |
30 #include "net/ssl/threaded_ssl_private_key.h" | 29 #include "net/ssl/threaded_ssl_private_key.h" |
31 | 30 |
32 namespace net { | 31 namespace net { |
33 | 32 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 size_t max_length; | 171 size_t max_length; |
173 if (!GetClientCertInfo(certificate, &type, &max_length)) | 172 if (!GetClientCertInfo(certificate, &type, &max_length)) |
174 return nullptr; | 173 return nullptr; |
175 | 174 |
176 return make_scoped_refptr(new ThreadedSSLPrivateKey( | 175 return make_scoped_refptr(new ThreadedSSLPrivateKey( |
177 base::MakeUnique<SSLPlatformKeyNSS>(type, max_length, std::move(key)), | 176 base::MakeUnique<SSLPlatformKeyNSS>(type, max_length, std::move(key)), |
178 GetSSLPlatformKeyTaskRunner())); | 177 GetSSLPlatformKeyTaskRunner())); |
179 } | 178 } |
180 | 179 |
181 } // namespace net | 180 } // namespace net |
OLD | NEW |