OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CHROME_BROWSER_NET_KEYGEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_NET_KEYGEN_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "build/build_config.h" |
| 13 #include "url/gurl.h" |
| 14 |
| 15 namespace content { |
| 16 class ResourceContext; |
| 17 } // namespace content |
| 18 |
| 19 namespace chrome_browser_net { |
| 20 |
| 21 // Handles keypair generation for generating client certificates via the |
| 22 // <keygen> tag. |
| 23 // <http://dev.w3.org/html5/spec/Overview.html#the-keygen-element> |
| 24 // <https://developer.mozilla.org/En/HTML/HTML_Extensions/KEYGEN_Tag> |
| 25 |
| 26 // TODO(mattm): ideally this should take a specific tab as the context, so that |
| 27 // it can use tab-modal dialogs. |
| 28 void Keygen(content::ResourceContext* context, |
| 29 int key_size_in_bits, |
| 30 const std::string& challenge, |
| 31 const GURL& url, |
| 32 bool stores_key, |
| 33 const base::Callback<void(const std::string*)>& callback); |
| 34 |
| 35 } // namespace chrome_browser_net |
| 36 |
| 37 #endif // CHROME_BROWSER_NET_KEYGEN_HANDLER_H_ |
OLD | NEW |