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