Fix comment
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
package acq.acq.src;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.net.ssl.KeyManagerFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
|
||||
import common.common.src.crypto.KeyFactory;
|
||||
import common.common.src.logger.Logger;
|
||||
import static common.common.src.ports.Ports.ACQ_SERVER_PORT;
|
||||
import static common.common.src.ports.Ports.ACS_SERVER_PORT;
|
||||
import common.common.src.requestHandlers.SSLServerFactory;
|
||||
import common.common.src.socket.SocketManager;
|
||||
|
||||
import javax.net.ssl.*;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import static common.common.src.ports.Ports.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main {
|
||||
|
||||
private static final String HOST = "127.0.0.1";
|
||||
@@ -35,9 +36,6 @@ public class Main {
|
||||
ctx = SSLContext.getInstance("TLS");
|
||||
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
|
||||
|
||||
//requestACS(ctx, ACS_SERVER_PORT);
|
||||
//requestACS(ctx, AUTH_PORT);
|
||||
|
||||
Thread ACQServer = SSLServerFactory.createServer(ctx, ACQ_SERVER_PORT, Main::handleRequest);
|
||||
ACQServer.start();
|
||||
|
||||
@@ -49,8 +47,7 @@ public class Main {
|
||||
Logger.displayReceived(response);
|
||||
|
||||
|
||||
// contact ACS
|
||||
|
||||
// Setup Connection ACS
|
||||
SSLSocketFactory factory = ctx.getSocketFactory();
|
||||
SSLSocket socketACS = (SSLSocket) factory.createSocket(Main.HOST, ACS_SERVER_PORT);
|
||||
socketACS.startHandshake();
|
||||
@@ -60,11 +57,12 @@ public class Main {
|
||||
SocketManager.send(socketACS, request);
|
||||
Logger.displaySent(request);
|
||||
|
||||
// Wait for ACK or NAK
|
||||
|
||||
response = SocketManager.readResponse(socketACS);
|
||||
Logger.displayReceived(response);
|
||||
|
||||
// Send back ACK or NAK
|
||||
|
||||
// Send back ACK or NAk To https server
|
||||
SocketManager.send(serverSocket, response);
|
||||
|
||||
}catch (IOException ioe){
|
||||
|
||||
Reference in New Issue
Block a user