prune: use stable doip-sdk

This commit is contained in:
CaiHQ 2022-01-04 10:15:46 +08:00
parent bc8f539c9c
commit ce77ebe0b9
2 changed files with 9 additions and 15 deletions

View File

@ -5,12 +5,12 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive; import com.google.gson.JsonPrimitive;
import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandler;
import org.bdware.doip.core.doipMessage.DoipMessage; import org.bdware.doip.codec.digitalObject.DigitalObject;
import org.bdware.doip.core.doipMessage.DoipResponseCode; import org.bdware.doip.codec.digitalObject.DoType;
import org.bdware.doip.core.model.digitalObject.DigitalObject; import org.bdware.doip.codec.digitalObject.Element;
import org.bdware.doip.core.model.digitalObject.DoType; import org.bdware.doip.codec.doipMessage.DoipMessage;
import org.bdware.doip.core.model.digitalObject.Element; import org.bdware.doip.codec.doipMessage.DoipResponseCode;
import org.bdware.doip.core.model.operations.BasicOperations; import org.bdware.doip.codec.operations.BasicOperations;
import org.bdware.doip.endpoint.doipServer.DoipServiceInfo; import org.bdware.doip.endpoint.doipServer.DoipServiceInfo;
import org.bdware.doip.endpoint.doipServer.Op; import org.bdware.doip.endpoint.doipServer.Op;
import org.bdware.doip.endpoint.doipServer.RepositoryHandlerBase; import org.bdware.doip.endpoint.doipServer.RepositoryHandlerBase;

View File

@ -1,11 +1,7 @@
package org.bdware.server.doip; package org.bdware.server.doip;
import com.nimbusds.jose.jwk.JWK;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bdware.doip.core.crypto.GlobalCertifications;
import org.bdware.doip.core.doipMessage.DoipMessageFormat;
import org.bdware.doip.core.utils.GlobalConfigurations;
import org.bdware.doip.endpoint.doipServer.DoipListenerInfo; import org.bdware.doip.endpoint.doipServer.DoipListenerInfo;
import org.bdware.doip.endpoint.doipServer.DoipServerImpl; import org.bdware.doip.endpoint.doipServer.DoipServerImpl;
import org.bdware.doip.endpoint.doipServer.DoipServiceInfo; import org.bdware.doip.endpoint.doipServer.DoipServiceInfo;
@ -34,10 +30,8 @@ public class ContractRepositoryMain {
} }
List<DoipListenerInfo> infos = new ArrayList<>(); List<DoipListenerInfo> infos = new ArrayList<>();
infos.add(new DoipListenerInfo(url, "2.1", DoipMessageFormat.PACKET)); infos.add(new DoipListenerInfo(url, "2.1"));
GlobalCertifications.jwKeyPair = JWK.parse("{\"kty\":\"EC\",\"d\":\"wMrGJjk877bKQ_AAvdb8DM1XpUFo6POSLYDXid6AfBw\",\"use\":\"sig\",\"crv\":\"P-256\",\"kid\":\"AIBD\\/dou.ADMIN\",\"x\":\"N0TydMwdnvkyHrXVh1zfc9_7DV6tRqfCGElhywzXJYo\",\"y\":\"rX5pGGML9efP2r8hoMSwxaR9gwVHmqaldsG-yfE_eUI\"}"); DoipServiceInfo info = new DoipServiceInfo(doid, "bdware.trust/Admin", "ContractRepo", infos);
GlobalConfigurations.userID = GlobalCertifications.jwKeyPair.getKeyID();
DoipServiceInfo info = new DoipServiceInfo(doid, GlobalConfigurations.userID, "ContractRepo", infos);
currentServer = new DoipServerImpl(info); currentServer = new DoipServerImpl(info);
currentServer.setRepositoryHandler(new ContractRepositoryHandler(info)); currentServer.setRepositoryHandler(new ContractRepositoryHandler(info));
currentServer.start(); currentServer.start();