Merge branch 'maximilien' into dev
This commit is contained in:
commit
0f6b4ddaa3
@ -116,7 +116,9 @@ public class ClientHandler implements Runnable, AutoCloseable {
|
|||||||
} else {
|
} else {
|
||||||
authentication(ruleResult);
|
authentication(ruleResult);
|
||||||
}
|
}
|
||||||
} catch (IOException ignore) { }
|
} catch (IOException ignore) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ import lightcontainer.interfaces.ProtocolRepository;
|
|||||||
import lightcontainer.interfaces.UnicastCHR;
|
import lightcontainer.interfaces.UnicastCHR;
|
||||||
import lightcontainer.repository.FileFrontEnd;
|
import lightcontainer.repository.FileFrontEnd;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLServerSocket;
|
||||||
|
import javax.net.ssl.SSLServerSocketFactory;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
@ -31,17 +33,17 @@ public class UnicastServerListener implements Runnable {
|
|||||||
/**
|
/**
|
||||||
* Initializes the server and starts it on the previously selected port.
|
* Initializes the server and starts it on the previously selected port.
|
||||||
*
|
*
|
||||||
* @since 1.0
|
|
||||||
*
|
|
||||||
* @see Thread#start()
|
* @see Thread#start()
|
||||||
* @see ClientHandler
|
* @see ClientHandler
|
||||||
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
// Allow looping in the loop and create a socket server
|
// Allow looping in the loop and create a socket server
|
||||||
|
SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
|
||||||
|
this.server = sslserversocketfactory.createServerSocket(this.server_port);
|
||||||
this.server_run = true;
|
this.server_run = true;
|
||||||
this.server = new ServerSocket(this.server_port);
|
|
||||||
while (this.server_run) {
|
while (this.server_run) {
|
||||||
// Accepting connection requests (blocking)
|
// Accepting connection requests (blocking)
|
||||||
Socket client = this.server.accept();
|
Socket client = this.server.accept();
|
||||||
@ -68,7 +70,8 @@ public class UnicastServerListener implements Runnable {
|
|||||||
try {
|
try {
|
||||||
this.server_run = false;
|
this.server_run = false;
|
||||||
this.server.close();
|
this.server.close();
|
||||||
} catch (IOException ignored) { }
|
} catch (IOException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class AES_GCM {
|
|||||||
public static void main(String[] args) throws Exception
|
public static void main(String[] args) throws Exception
|
||||||
{
|
{
|
||||||
// Text pour test :
|
// Text pour test :
|
||||||
String plainText = "salut fils de pute";
|
String plainText = "salut fils de pute";//TODO enlever le text chelou de Jérémi (ce fou là)
|
||||||
|
|
||||||
String IV = generateIV();
|
String IV = generateIV();
|
||||||
String key = generateSecretKey();
|
String key = generateSecretKey();
|
||||||
|
BIN
ffe.labo.swilabus.com.p12
Normal file
BIN
ffe.labo.swilabus.com.p12
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user