blob: a00c8e06632429b3ab68c242df4cd6a4956ea235 [file] [log] [blame]
Gaurav Shahed9389c2013-05-09 15:17:06 -07001// 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
5#include "mock_crypto_util_proxy.h"
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
16namespace shill {
17
18MockCryptoUtilProxy::MockCryptoUtilProxy(
19 EventDispatcher *dispatcher, GLib *glib)
20 : CryptoUtilProxy(dispatcher, glib) {}
21
22MockCryptoUtilProxy::~MockCryptoUtilProxy() {}
23
24bool 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,
35 nonce,signed_data,
36 destination_udn, ssid, bssid,
37 result_callback, error);
38}
39
40bool 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
49bool 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