| Index: chrome/browser/chromeos/platform_keys/platform_keys.h
|
| diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.h b/chrome/browser/chromeos/platform_keys/platform_keys.h
|
| index b16504e9b5f443de5e8eb97b63d7369b23189afb..05d0deff4c727389132ad45e17c9884cda2e8e55 100644
|
| --- a/chrome/browser/chromeos/platform_keys/platform_keys.h
|
| +++ b/chrome/browser/chromeos/platform_keys/platform_keys.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "net/ssl/ssl_client_cert_type.h"
|
|
|
| namespace content {
|
| class BrowserContext;
|
| @@ -43,6 +44,19 @@ enum HashAlgorithm {
|
| HASH_ALGORITHM_SHA512
|
| };
|
|
|
| +struct ClientCertificateRequest {
|
| + ClientCertificateRequest();
|
| + ~ClientCertificateRequest();
|
| +
|
| + // The list of the types of certificates requested, sorted in order of the
|
| + // server's preference.
|
| + std::vector<net::SSLClientCertType> certificate_key_types;
|
| +
|
| + // List of distinguished names of certificate authorities allowed by the
|
| + // server. Each entry must be a DER-encoded X.509 DistinguishedName.
|
| + std::vector<std::string> certificate_authorities;
|
| +};
|
| +
|
| namespace subtle {
|
| // Functions of this namespace shouldn't be called directly from the context of
|
| // an extension. Instead use PlatformKeysService which enforces restrictions
|
| @@ -77,6 +91,20 @@ void Sign(const std::string& token_id,
|
| const SignCallback& callback,
|
| content::BrowserContext* browser_context);
|
|
|
| +// If the certificate request could be processed successfully, |matches| will
|
| +// contain the list of matching certificates (which may be empty) and
|
| +// |error_message| will be empty. If an error occurred, |matches| will be null
|
| +// and |error_message| contain an error message.
|
| +typedef base::Callback<void(scoped_ptr<net::CertificateList> matches,
|
| + const std::string& error_message)>
|
| + SelectCertificatesCallback;
|
| +
|
| +// Returns the list of all certificates that match |request|. |callback| will be
|
| +// invoked with these matches or an error message.
|
| +void SelectClientCertificates(const ClientCertificateRequest& request,
|
| + const SelectCertificatesCallback& callback,
|
| + content::BrowserContext* browser_context);
|
| +
|
| } // namespace subtle
|
|
|
| // If the list of certificates could be successfully retrieved, |certs| will
|
|
|