Gaurav Shah | ed9389c | 2013-05-09 15:17:06 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS 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 | |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 5 | #include "shill/mock_crypto_util_proxy.h" |
Gaurav Shah | ed9389c | 2013-05-09 15:17:06 -0700 | [diff] [blame] | 6 | |
| 7 | #include <string> |
| 8 | #include <vector> |
| 9 | |
| 10 | #include <base/basictypes.h> |
| 11 | |
| 12 | #include "shill/callbacks.h" |
| 13 | #include "shill/error.h" |
| 14 | #include "shill/event_dispatcher.h" |
| 15 | |
| 16 | namespace shill { |
| 17 | |
| 18 | MockCryptoUtilProxy::MockCryptoUtilProxy( |
| 19 | EventDispatcher *dispatcher, GLib *glib) |
| 20 | : CryptoUtilProxy(dispatcher, glib) {} |
| 21 | |
| 22 | MockCryptoUtilProxy::~MockCryptoUtilProxy() {} |
| 23 | |
| 24 | bool MockCryptoUtilProxy::RealVerifyDestination( |
| 25 | const std::string &certificate, |
| 26 | const std::string &public_key, |
| 27 | const std::string &nonce, |
| 28 | const std::string &signed_data, |
| 29 | const std::string &destination_udn, |
| 30 | const std::vector<uint8_t> &ssid, |
| 31 | const std::string &bssid, |
| 32 | const ResultBoolCallback &result_callback, |
| 33 | Error *error) { |
| 34 | return CryptoUtilProxy::VerifyDestination(certificate, public_key, |
Alex Vakulenko | 8a53229 | 2014-06-16 17:18:44 -0700 | [diff] [blame] | 35 | nonce, signed_data, |
Gaurav Shah | ed9389c | 2013-05-09 15:17:06 -0700 | [diff] [blame] | 36 | destination_udn, ssid, bssid, |
| 37 | result_callback, error); |
| 38 | } |
| 39 | |
| 40 | bool MockCryptoUtilProxy::RealEncryptData( |
| 41 | const std::string &public_key, |
| 42 | const std::string &data, |
| 43 | const ResultStringCallback &result_callback, |
| 44 | Error *error) { |
| 45 | return CryptoUtilProxy::EncryptData(public_key, data, |
| 46 | result_callback, error); |
| 47 | } |
| 48 | |
| 49 | bool MockCryptoUtilProxy::RealStartShimForCommand( |
| 50 | const std::string &command, |
| 51 | const std::string &input, |
| 52 | const StringCallback &result_handler) { |
| 53 | return CryptoUtilProxy::StartShimForCommand(command, input, |
| 54 | result_handler); |
| 55 | } |
| 56 | |
| 57 | } // namespace shill |