/*
-* Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace smartcard_service_api
{
- unsigned int ServiceInstance::openSession(Terminal *terminal, ByteArray packageCert, void *caller)
+ unsigned int ServiceInstance::openSession(Terminal *terminal, vector<ByteArray> &certHashes, void *caller)
{
unsigned int handle = IntegerHandle::assignHandle();
- ServerSession *session = new ServerSession((ServerReader *)0, packageCert, caller, terminal);
+ ServerSession *session = new ServerSession((ServerReader *)0, certHashes, caller, terminal);
mapSessions.insert(make_pair(handle, make_pair(session, terminal)));
mapSessions.clear();
}
- unsigned int ServiceInstance::openChannel(unsigned int session, int channelNum)
+ unsigned int ServiceInstance::openChannel(unsigned int session, int channelNum, ByteArray response)
{
Terminal *terminal = getTerminal(session);
ServerChannel *channel = NULL;
{
handle = IntegerHandle::assignHandle();
mapChannels.insert(make_pair(handle, make_pair(session, channel)));
+
+ if (response != ByteArray::EMPTY)
+ channel->selectResponse = response;
}
else
{