OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_SSL_SSL_PLATFORM_KEY_UTIL_H_ |
| 6 #define NET_SSL_SSL_PLATFORM_KEY_UTIL_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "net/base/net_export.h" |
| 12 #include "net/ssl/ssl_private_key.h" |
| 13 |
| 14 namespace base { |
| 15 class SingleThreadTaskRunner; |
| 16 } |
| 17 |
| 18 namespace net { |
| 19 |
| 20 class X509Certificate; |
| 21 |
| 22 // Returns a task runner to serialize all private key operations on a single |
| 23 // background thread to avoid problems with buggy smartcards. Its underlying |
| 24 // Thread is non-joinable and as such provides |
| 25 // TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN semantics. |
| 26 scoped_refptr<base::SingleThreadTaskRunner> GetSSLPlatformKeyTaskRunner(); |
| 27 |
| 28 // Determines the key type and maximum signature length of |certificate|'s |
| 29 // public key. |
| 30 NET_EXPORT_PRIVATE bool GetClientCertInfo(const X509Certificate* certificate, |
| 31 SSLPrivateKey::Type* out_type, |
| 32 size_t* out_max_length); |
| 33 |
| 34 } // namespace net |
| 35 |
| 36 #endif // NET_SSL_SSL_PLATFORM_KEY_UTIL_H_ |
OLD | NEW |