Commit 5a3f96d0 authored by Oleksandr Dmytrenko's avatar Oleksandr Dmytrenko Committed by Randeep

cloud server crl

Change-Id: Ic920258819ae8ebcc14592279c07b2069a6525ff
Signed-off-by: default avatarOleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12635Reviewed-by: default avatardongik Lee <dongik.lee@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep's avatarRandeep Singh <randeep.s@samsung.com>
parent bc8f5a28
......@@ -31,6 +31,7 @@ import org.iotivity.cloud.accountserver.resources.acl.group.GroupResource;
import org.iotivity.cloud.accountserver.resources.acl.id.AclResource;
import org.iotivity.cloud.accountserver.resources.acl.invite.InviteResource;
import org.iotivity.cloud.accountserver.resources.credprov.cert.CertificateResource;
import org.iotivity.cloud.accountserver.resources.credprov.crl.CrlResource;
import org.iotivity.cloud.base.ServerSystem;
import org.iotivity.cloud.base.server.CoapServer;
import org.iotivity.cloud.util.Log;
......@@ -66,10 +67,14 @@ public class AccountServer {
serverSystem.addResource(new CertificateResource());
serverSystem.addResource(new CrlResource());
serverSystem.addResource(new AclResource());
serverSystem.addResource(new InviteResource());
serverSystem.addServer(new CoapServer(new InetSocketAddress(Integer
.parseInt(args[0]))));
serverSystem.addServer(new CoapServer(
new InetSocketAddress(Integer.parseInt(args[0]))));
boolean tlsMode = Integer.parseInt(args[1]) == 1;
......
......@@ -35,6 +35,7 @@ import org.iotivity.cloud.ciserver.resources.proxy.account.Acl;
import org.iotivity.cloud.ciserver.resources.proxy.account.AclGroup;
import org.iotivity.cloud.ciserver.resources.proxy.account.AclInvite;
import org.iotivity.cloud.ciserver.resources.proxy.account.Certificate;
import org.iotivity.cloud.ciserver.resources.proxy.account.Crl;
import org.iotivity.cloud.ciserver.resources.proxy.mq.MessageQueue;
import org.iotivity.cloud.ciserver.resources.proxy.rd.DevicePresence;
import org.iotivity.cloud.ciserver.resources.proxy.rd.ResourceDirectory;
......@@ -42,12 +43,6 @@ import org.iotivity.cloud.ciserver.resources.proxy.rd.ResourceFind;
import org.iotivity.cloud.ciserver.resources.proxy.rd.ResourcePresence;
import org.iotivity.cloud.util.Log;
/**
*
* This class is in charge of running of cloud interface server
*
*/
public class CloudInterfaceServer {
public static void main(String[] args) throws Exception {
......@@ -86,7 +81,7 @@ public class CloudInterfaceServer {
AclGroup aclGroupHandler = new AclGroup();
Certificate certHandler = new Certificate();
AclInvite aclInviteHandler = new AclInvite();
Crl crlHandler = new Crl();
CoapDevicePool devicePool = deviceServer.getDevicePool();
deviceServer.addResource(acHandler);
......@@ -111,6 +106,8 @@ public class CloudInterfaceServer {
deviceServer.addResource(aclInviteHandler);
deviceServer.addResource(crlHandler);
KeepAliveResource resKeepAlive = new KeepAliveResource(
new int[] { 1, 2, 4, 8 });
......
package org.iotivity.cloud.ciserver.resources.proxy.account;
import java.util.Arrays;
import org.iotivity.cloud.base.connector.ConnectorPool;
import org.iotivity.cloud.base.device.Device;
import org.iotivity.cloud.base.device.IRequestChannel;
import org.iotivity.cloud.base.exception.ServerException;
import org.iotivity.cloud.base.protocols.IRequest;
import org.iotivity.cloud.base.resource.Resource;
import org.iotivity.cloud.ciserver.Constants;
public class Crl extends Resource {
private IRequestChannel mAuthServer = null;
public Crl() {
super(Arrays.asList(Constants.PREFIX_OIC,
Constants.CREDPROV_URI, Constants.REQ_CRL));
mAuthServer = ConnectorPool.getConnection("account");
}
@Override
public void onDefaultRequestReceived(Device srcDevice, IRequest request)
throws ServerException {
// Token exchange is done by CoapClient
mAuthServer.sendRequest(request, srcDevice);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment