blob: 4c828c5237f0e54c56a67a605f174ace86c1da37 [file] [log] [blame]
Paul Stewartac0ffbf2017-03-03 16:43:33 -08001/* Copyright 2017 The Android Open Source Project
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * 1. Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * 2. Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution.
11 *
12 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
13 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
16 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
19 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
22
Paul Stewart657356c2017-03-09 00:00:23 -080023#ifndef ANDROID_KEYSTORE_BACKEND_BINDER_H
24#define ANDROID_KEYSTORE_BACKEND_BINDER_H
25
Paul Stewartac0ffbf2017-03-03 16:43:33 -080026#include "keystore_backend.h"
27
28class KeystoreBackendBinder : public KeystoreBackend {
29 public:
Janis Danisevskisba2985a2018-11-14 21:10:39 -080030 KeystoreBackendBinder();
Paul Stewartac0ffbf2017-03-03 16:43:33 -080031 virtual ~KeystoreBackendBinder() {}
32 int32_t sign(const char *key_id, const uint8_t* in, size_t len,
33 uint8_t** reply, size_t* reply_len) override;
34 int32_t get_pubkey(const char *key_id, uint8_t** pubkey,
35 size_t* reply_len) override;
36};
37
Paul Stewart657356c2017-03-09 00:00:23 -080038#endif // ANDROID_KEYSTORE_BACKEND_BINDER_H