blob: 8c26b425bc2272a5f5c7a99e47ec5c3324b8a017 [file] [log] [blame]
Bruno Rocha7f9aea22011-09-12 14:31:24 -07001// Copyright (c) 2011 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 Deymo8427b4a2014-11-05 14:00:32 -08005#ifndef UPDATE_ENGINE_MOCK_CERTIFICATE_CHECKER_H_
6#define UPDATE_ENGINE_MOCK_CERTIFICATE_CHECKER_H_
Bruno Rocha7f9aea22011-09-12 14:31:24 -07007
8#include <gmock/gmock.h>
9#include <openssl/ssl.h>
10
11#include "update_engine/certificate_checker.h"
12
13namespace chromeos_update_engine {
14
Alex Deymo8427b4a2014-11-05 14:00:32 -080015class MockOpenSSLWrapper : public OpenSSLWrapper {
Bruno Rocha7f9aea22011-09-12 14:31:24 -070016 public:
17 MOCK_CONST_METHOD4(GetCertificateDigest,
18 bool(X509_STORE_CTX* x509_ctx,
19 int* out_depth,
20 unsigned int* out_digest_length,
Alex Vakulenkof68bbbc2015-02-09 12:53:18 -080021 uint8_t* out_digest));
Bruno Rocha7f9aea22011-09-12 14:31:24 -070022};
23
24} // namespace chromeos_update_engine
25
Alex Deymo8427b4a2014-11-05 14:00:32 -080026#endif // UPDATE_ENGINE_MOCK_CERTIFICATE_CHECKER_H_