C API still does create and destroy socket per each API call.
Change-Id: I99f90da5dca8e7ddc615b7d39d8a0a26055984d6
CKM::Singleton<CKM::Log::LogSystem>::Instance().SetTag("CKM_CLIENT");
}
-int waitForSocket(int sock, int event, int timeout) {
+} // namespace anonymous
+
+namespace CKM {
+
+SockRAII::SockRAII() : m_sock(-1) {}
+
+SockRAII::~SockRAII()
+{
+ Disconnect();
+}
+
+int SockRAII::Connect(char const * const interface)
+{
+ int sock = -1;
+ try
+ {
+ if(!interface) {
+ LogError("No valid interface address given.");
+ throw CKM_API_ERROR_INPUT_PARAM;
+ }
+
+ sock = socket(AF_UNIX, SOCK_STREAM, 0);
+ if(sock < 0) {
+ LogError("Error creating socket: " << CKM::GetErrnoString(errno));
+ throw CKM_API_ERROR_SOCKET;
+ }
+
+ // configure non-blocking mode
+ int flags;
+ if((flags = fcntl(sock, F_GETFL, 0)) < 0 || fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0)
+ {
+ LogError("Error in fcntl: " << CKM::GetErrnoString(errno));
+ throw CKM_API_ERROR_SOCKET;
+ }
+
+ sockaddr_un clientAddr;
+ memset(&clientAddr, 0, sizeof(clientAddr));
+ clientAddr.sun_family = AF_UNIX;
+ if(strlen(interface) >= sizeof(clientAddr.sun_path))
+ {
+ LogError("Error: interface name " << interface << "is too long. Max len is:" << sizeof(clientAddr.sun_path));
+ throw CKM_API_ERROR_INPUT_PARAM;
+ }
+
+ strcpy(clientAddr.sun_path, interface);
+ LogDebug("ClientAddr.sun_path = " << interface);
+
+ int retval = TEMP_FAILURE_RETRY(::connect(sock, (struct sockaddr*)&clientAddr, SUN_LEN(&clientAddr)));
+ if(-1 == retval)
+ {
+ switch(errno)
+ {
+ case EACCES:
+ LogError("Access denied");
+ throw CKM_API_ERROR_ACCESS_DENIED;
+ break;
+
+ case EINPROGRESS:
+ {
+ if( 0 >= WaitForSocket(POLLOUT, POLL_TIMEOUT))
+ {
+ LogError("Error in WaitForSocket.");
+ throw CKM_API_ERROR_SOCKET;
+ }
+
+ int error = 0;
+ size_t len = sizeof(error);
+ retval = getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len);
+ if(-1 == retval)
+ {
+ LogError("Error in getsockopt: " << CKM::GetErrnoString(error));
+ throw CKM_API_ERROR_SOCKET;
+ }
+
+ if(error == EACCES)
+ {
+ LogError("Access denied");
+ throw CKM_API_ERROR_ACCESS_DENIED;
+ }
+
+ if(error != 0)
+ {
+ LogError("Error in connect: " << CKM::GetErrnoString(error));
+ throw CKM_API_ERROR_SOCKET;
+ }
+
+ break;
+ }
+
+ default:
+ LogError("Error connecting socket: " << CKM::GetErrnoString(errno));
+ throw CKM_API_ERROR_SOCKET;
+ break;
+ }
+ }
+ }
+ catch(int & error_code) {
+ if(sock > 0)
+ close(sock);
+ return error_code;
+ }
+
+ m_sock = sock;
+ return CKM_API_SUCCESS;
+}
+
+bool SockRAII::isConnected() const {
+ return (m_sock != -1);
+}
+
+void SockRAII::Disconnect() {
+ if( isConnected() )
+ close(m_sock);
+ m_sock = -1;
+}
+
+int SockRAII::WaitForSocket(int event, int timeout)
+{
int retval;
pollfd desc[1];
- desc[0].fd = sock;
+ desc[0].fd = m_sock;
desc[0].events = event;
while((-1 == (retval = poll(desc, 1, timeout))) && (errno == EINTR)) {
if (0 == retval) {
LogDebug("Poll timeout");
- } else if (-1 == retval) {
- int err = errno;
- LogError("Error in poll: " << CKM::GetErrnoString(err));
+ } else if(-1 == retval) {
+ LogError("Error in poll: " << CKM::GetErrnoString(errno));
}
return retval;
}
+int SockRAII::Get() const {
+ return m_sock;
+}
+
} // namespace anonymous
namespace CKM {
return m_label.empty();
}
+ServiceConnection::ServiceConnection(char const * const service_interface) {
+ if(service_interface)
+ m_service_interface = std::string(service_interface);
+}
-int connectSocket(int& sock, char const * const interface) {
- sockaddr_un clientAddr;
- int flags;
-
- if (sock != -1) // guard
- close(sock);
-
- sock = socket(AF_UNIX, SOCK_STREAM, 0);
- if (sock < 0) {
- int err = errno;
- LogError("Error creating socket: " << GetErrnoString(err));
- return CKM_API_ERROR_SOCKET;
- }
-
- if ((flags = fcntl(sock, F_GETFL, 0)) < 0 ||
- fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0)
- {
- int err = errno;
- LogError("Error in fcntl: " << GetErrnoString(err));
- return CKM_API_ERROR_SOCKET;
- }
-
- memset(&clientAddr, 0, sizeof(clientAddr));
-
- clientAddr.sun_family = AF_UNIX;
+int ServiceConnection::processRequest( const CKM::RawBuffer &send_buf,
+ CKM::MessageBuffer &recv_buf) {
+ int ec;
+ if(CKM_API_SUCCESS != (ec = send(send_buf)))
+ return ec;
- if (strlen(interface) >= sizeof(clientAddr.sun_path)) {
- LogError("Error: interface name " << interface << "is too long. Max len is:" <<
- sizeof(clientAddr.sun_path));
- return CKM_API_ERROR_SOCKET;
- }
+ return receive(recv_buf);
+}
- strcpy(clientAddr.sun_path, interface);
+int ServiceConnection::Connect()
+{
+ // cleanup
+ if( isConnected() )
+ Disconnect();
- LogDebug("ClientAddr.sun_path = " << interface);
+ return SockRAII::Connect(m_service_interface.c_str());
+}
- int retval = TEMP_FAILURE_RETRY(
- connect(sock, (struct sockaddr*)&clientAddr, SUN_LEN(&clientAddr)));
- if ((retval == -1) && (errno == EINPROGRESS)) {
- if (0 >= waitForSocket(sock, POLLOUT, POLL_TIMEOUT)) {
- LogError("Error in waitForSocket.");
- return CKM_API_ERROR_SOCKET;
- }
- int error = 0;
- socklen_t len = sizeof(error);
- retval = getsockopt(sock, SOL_SOCKET, SO_ERROR, &error, &len);
-
- if (-1 == retval) {
- int err = errno;
- LogError("Error in getsockopt: " << GetErrnoString(err));
- return CKM_API_ERROR_SOCKET;
+int ServiceConnection::send(const CKM::RawBuffer &send_buf)
+{
+ if( ! isConnected() )
+ {
+ int ec;
+ if(CKM_API_SUCCESS != (ec = ServiceConnection::Connect()))
+ {
+ LogError("send failed, connect fail code: " << ec);
+ return ec;
}
+ }
- if (error == EACCES) {
- LogError("Access denied");
- return CKM_API_ERROR_ACCESS_DENIED;
+ int ec = CKM_API_SUCCESS;
+ ssize_t done = 0;
+ while((send_buf.size() - done) > 0)
+ {
+ if( 0 >= WaitForSocket(POLLOUT, POLL_TIMEOUT)) {
+ LogError("Error in WaitForSocket.");
+ ec = CKM_API_ERROR_SOCKET;
+ break;
}
- if (error != 0) {
- LogError("Error in connect: " << GetErrnoString(error));
- return CKM_API_ERROR_SOCKET;
+ ssize_t temp = TEMP_FAILURE_RETRY(write(Get(), &send_buf[done], send_buf.size() - done));
+ if(-1 == temp) {
+ LogError("Error in write: " << CKM::GetErrnoString(errno));
+ ec = CKM_API_ERROR_SOCKET;
+ break;
}
- return CKM_API_SUCCESS;
+ done += temp;
}
- if (-1 == retval) {
- int err = errno;
- LogError("Error connecting socket: " << GetErrnoString(err));
- if (err == EACCES)
- return CKM_API_ERROR_ACCESS_DENIED;
- return CKM_API_ERROR_SOCKET;
- }
+ if(ec != CKM_API_SUCCESS)
+ Disconnect();
- return CKM_API_SUCCESS;
+ return ec;
}
-int sendToServer(char const * const interface, const RawBuffer &send, MessageBuffer &recv) {
- int ret;
- SockRAII sock;
- ssize_t done = 0;
- char buffer[2048];
-
- if (CKM_API_SUCCESS != (ret = sock.Connect(interface))) {
- LogError("Error in SockRAII");
- return ret;
+int ServiceConnection::receive(CKM::MessageBuffer &recv_buf)
+{
+ if( ! isConnected() )
+ {
+ LogError("Not connected!");
+ return CKM_API_ERROR_SOCKET;
}
- while ((send.size() - done) > 0) {
- if (0 >= waitForSocket(sock.Get(), POLLOUT, POLL_TIMEOUT)) {
- LogError("Error in poll(POLLOUT)");
- return CKM_API_ERROR_SOCKET;
- }
- ssize_t temp = TEMP_FAILURE_RETRY(write(sock.Get(), &send[done], send.size() - done));
- if (-1 == temp) {
- int err = errno;
- LogError("Error in write: " << GetErrnoString(err));
- return CKM_API_ERROR_SOCKET;
+ int ec = CKM_API_SUCCESS;
+ const size_t c_recv_buf_len = 2048;
+ char buffer[c_recv_buf_len];
+ do
+ {
+ if( 0 >= WaitForSocket(POLLIN, POLL_TIMEOUT)) {
+ LogError("Error in WaitForSocket.");
+ ec = CKM_API_ERROR_SOCKET;
+ break;
}
- done += temp;
- }
- do {
- if (0 >= waitForSocket(sock.Get(), POLLIN, POLL_TIMEOUT)) {
- LogError("Error in poll(POLLIN)");
- return CKM_API_ERROR_SOCKET;
- }
- ssize_t temp = TEMP_FAILURE_RETRY(read(sock.Get(), buffer, 2048));
- if (-1 == temp) {
- int err = errno;
- LogError("Error in read: " << GetErrnoString(err));
- return CKM_API_ERROR_SOCKET;
+ ssize_t temp = TEMP_FAILURE_RETRY(read(Get(), buffer, sizeof(buffer)));
+ if(-1 == temp) {
+ LogError("Error in read: " << CKM::GetErrnoString(errno));
+ ec = CKM_API_ERROR_SOCKET;
+ break;
}
if (0 == temp) {
LogError("Read return 0/Connection closed by server(?)");
- return CKM_API_ERROR_SOCKET;
+ ec = CKM_API_ERROR_SOCKET;
+ break;
}
- RawBuffer raw(buffer, buffer+temp);
- recv.Push(raw);
- } while(!recv.Ready());
- return CKM_API_SUCCESS;
+ CKM::RawBuffer raw(buffer, buffer+temp);
+ recv_buf.Push(raw);
+ }
+ while(!recv_buf.Ready());
+
+ if(ec != CKM_API_SUCCESS)
+ Disconnect();
+
+ return ec;
+}
+
+ServiceConnection::~ServiceConnection()
+{
}
int try_catch(const std::function<int()>& func)
{
+ int retval = CKM_API_ERROR_UNKNOWN;
try {
return func();
} catch (MessageBuffer::Exception::Base &e) {
} catch (...) {
LogError("Unknown exception occured");
}
- return CKM_API_ERROR_UNKNOWN;
+ return retval;
}
void try_catch_async(const std::function<void()>& func, const std::function<void(int)>& error)
Label m_label;
};
-int connectSocket(int& sock, char const * const interface);
+class SockRAII {
+ public:
+ SockRAII();
-int sendToServer(char const * const interface, const RawBuffer &send, MessageBuffer &recv);
+ NONCOPYABLE(SockRAII);
+ virtual ~SockRAII();
-class SockRAII {
-public:
- SockRAII()
- : m_sock(-1)
- {}
+ int Connect(char const * const interface);
+ void Disconnect();
+ bool isConnected() const;
+ int Get() const;
+
+ protected:
+ int WaitForSocket(int event, int timeout);
+
+ private:
+ int m_sock;
+};
+
+class ServiceConnection : public SockRAII
+{
+ public:
+ ServiceConnection(char const * const service_interface);
- NONCOPYABLE(SockRAII);
+ // roundtrip: send and receive
+ int processRequest(const CKM::RawBuffer &send_buf,
+ CKM::MessageBuffer &recv_buf);
- virtual ~SockRAII() {
- if (m_sock > -1)
- close(m_sock);
- }
+ // blocking
+ int send(const CKM::RawBuffer &send_buf);
+ int receive(CKM::MessageBuffer &recv_buf);
- int Connect(char const * const interface) {
- return CKM::connectSocket(m_sock, interface);
- }
+ virtual ~ServiceConnection();
- int Get() const {
- return m_sock;
- }
+ private:
+ std::string m_service_interface;
-private:
- int m_sock;
+ int Connect();
};
+
/*
* Decorator function that performs frequently repeated exception handling in
* SS client API functions. Accepts lambda expression as an argument.
class ControlImpl : public Control {
public:
- ControlImpl(){}
+ ControlImpl() : m_controlConnection(SERVICE_SOCKET_CKM_CONTROL) {}
ControlImpl(const ControlImpl &) = delete;
ControlImpl(ControlImpl &&) = delete;
ControlImpl& operator=(const ControlImpl &) = delete;
auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::UNLOCK_USER_KEY),
user,
password);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
}
MessageBuffer recv;
- auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::LOCK_USER_KEY),
- user);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::LOCK_USER_KEY), user);
+
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
}
MessageBuffer recv;
- auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::REMOVE_USER_DATA),
- user);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::REMOVE_USER_DATA), user);
+
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
oldPassword,
newPassword);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
user,
newPassword);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
}
MessageBuffer recv;
- auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::REMOVE_APP_DATA),
- smackLabel);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::REMOVE_APP_DATA), smackLabel);
+
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
return try_catch([&] {
MessageBuffer recv;
auto send = MessageBuffer::Serialize(static_cast<int>(ControlCommand::UPDATE_CC_MODE));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
recv.Deserialize(retCode);
alias,
accessor,
static_cast<int>(granted));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
recv.Deserialize(command, counter, retCode);
+
return retCode;
});
}
owner,
alias,
accessor);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_CONTROL,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_controlConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
recv.Deserialize(command, counter, retCode);
+
return retCode;
});
}
virtual ~ControlImpl(){}
+private:
+ CKM::ServiceConnection m_controlConnection;
};
ControlShPtr Control::create() {
bool ManagerImpl::s_isInit = false;
ManagerImpl::ManagerImpl()
- : m_counter(0)
+ : m_counter(0), m_storageConnection(SERVICE_SOCKET_CKM_STORAGE), m_ocspConnection(SERVICE_SOCKET_OCSP)
{
// TODO secure with mutex
if (!s_isInit) {
s_isInit = true;
clientInitialize();
}
-
}
rawData,
PolicySerializable(policy));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
static_cast<int>(dataType),
helper.getName(),
helper.getLabel());
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
helper.getName(),
helper.getLabel(),
password);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
int tmpDataType;
- recv.Deserialize(command, counter, retCode, tmpDataType,rawData);
+ recv.Deserialize(command, counter, retCode, tmpDataType, rawData);
recvDataType = static_cast<DBDataType>(tmpDataType);
if (counter != m_counter) {
auto send = MessageBuffer::Serialize(static_cast<int>(LogicCommand::GET_LIST),
m_counter,
static_cast<int>(dataType));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
PolicySerializable(policyPublicKey),
privateKeyAlias,
publicKeyAlias);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
int counter,
const CertificateShPtr &certificate,
const T &sendData,
- CertificateShPtrVector &certificateChainVector)
+ CertificateShPtrVector &certificateChainVector,
+ ServiceConnection & service_connection)
{
return try_catch([&] {
counter,
certificate->getDER(),
sendData);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = service_connection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int retCommand;
int retCounter;
++m_counter,
certificate,
rawBufferVector,
- certificateChainVector);
+ certificateChainVector,
+ m_storageConnection);
}
int ManagerImpl::getCertificateChain(
++m_counter,
certificate,
untrustedCertificates,
- certificateChainVector);
+ certificateChainVector,
+ m_storageConnection);
}
int ManagerImpl::createSignature(
message,
static_cast<int>(hash),
static_cast<int>(padding));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
-
recv.Deserialize(command, counter, retCode, signature);
if ((command != static_cast<int>(LogicCommand::CREATE_SIGNATURE))
signature,
static_cast<int>(hash),
static_cast<int>(padding));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
-
recv.Deserialize(command, counter, retCode);
if ((command != static_cast<int>(LogicCommand::VERIFY_SIGNATURE))
auto send = MessageBuffer::Serialize(my_counter, rawCertChain);
- int retCode = sendToServer(
- SERVICE_SOCKET_OCSP,
- send.Pop(),
- recv);
-
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_ocspConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int counter;
-
recv.Deserialize(counter, retCode, ocspStatus);
if (my_counter != counter) {
alias,
accessor,
static_cast<int>(granted));
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
my_counter,
alias,
accessor);
- int retCode = sendToServer(
- SERVICE_SOCKET_CKM_STORAGE,
- send.Pop(),
- recv);
- if (CKM_API_SUCCESS != retCode) {
+ int retCode = m_storageConnection.processRequest(send.Pop(), recv);
+ if (CKM_API_SUCCESS != retCode)
return retCode;
- }
int command;
int counter;
#pragma once
#include <protocols.h>
-
+#include <client-common.h>
#include <ckm/ckm-type.h>
#include <ckm/ckm-key.h>
#include <ckm/ckm-manager.h>
int m_counter;
static bool s_isInit;
+ CKM::ServiceConnection m_storageConnection;
+ CKM::ServiceConnection m_ocspConnection;
};
} // namespace CKM