CCF
Loading...
Searching...
No Matches
node_client.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/crypto/pem.h"
7#include "enclave/rpc_map.h"
8#include "http/http_builder.h"
9
10namespace ccf
11{
13 {
14 protected:
15 std::shared_ptr<ccf::RPCMap> rpc_map;
18 const std::optional<ccf::crypto::Pem>& endorsed_node_cert = std::nullopt;
19
20 public:
22 std::shared_ptr<ccf::RPCMap> rpc_map_,
23 ccf::crypto::KeyPairPtr node_sign_kp_,
24 const ccf::crypto::Pem& self_signed_node_cert_,
25 const std::optional<ccf::crypto::Pem>& endorsed_node_cert_) :
26 rpc_map(rpc_map_),
27 node_sign_kp(node_sign_kp_),
28 self_signed_node_cert(self_signed_node_cert_),
29 endorsed_node_cert(endorsed_node_cert_)
30 {}
31
32 virtual ~NodeClient() {}
33
34 virtual bool make_request(::http::Request& request) = 0;
35 };
36}
Definition node_client.h:13
NodeClient(std::shared_ptr< ccf::RPCMap > rpc_map_, ccf::crypto::KeyPairPtr node_sign_kp_, const ccf::crypto::Pem &self_signed_node_cert_, const std::optional< ccf::crypto::Pem > &endorsed_node_cert_)
Definition node_client.h:21
ccf::crypto::KeyPairPtr node_sign_kp
Definition node_client.h:16
const ccf::crypto::Pem & self_signed_node_cert
Definition node_client.h:17
virtual ~NodeClient()
Definition node_client.h:32
std::shared_ptr< ccf::RPCMap > rpc_map
Definition node_client.h:15
const std::optional< ccf::crypto::Pem > & endorsed_node_cert
Definition node_client.h:18
virtual bool make_request(::http::Request &request)=0
Definition pem.h:18
Definition http_builder.h:118
std::shared_ptr< KeyPair > KeyPairPtr
Definition key_pair.h:145
Definition app_interface.h:14