cryptography rework and beginning of tcp-chat-protocol
This commit is contained in:
@@ -30,7 +30,7 @@ Result(void) server_run(cstr server_endpoint_str){
|
||||
|
||||
static void* handle_connection(void* _args){
|
||||
Deferral(64);
|
||||
ConnectionHandlerArgs* args = (ConnectionHandlerArgs*)_args;
|
||||
//ConnectionHandlerArgs* args = (ConnectionHandlerArgs*)_args;
|
||||
// TODO: receive handshake and session key
|
||||
|
||||
//ClientConnection conn;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#pragma once
|
||||
#include "cryptography/cryptography.h"
|
||||
#include "network/EncryptedSocket.h"
|
||||
#include "cryptography/AES.h"
|
||||
#include "cryptography/RSA.h"
|
||||
#include "network/encrypted_sockets.h"
|
||||
|
||||
Result(void) server_run(cstr server_endpoint_str);
|
||||
|
||||
typedef struct ClientConnection {
|
||||
u64 session_id;
|
||||
EndpointIPv4 client_end;
|
||||
Array(u8) session_key;
|
||||
EncryptedSocket system_socket;
|
||||
EncryptedSocket content_socket;
|
||||
EncryptedSocketTCP system_socket;
|
||||
EncryptedSocketTCP content_socket;
|
||||
} ClientConnection;
|
||||
|
||||
Reference in New Issue
Block a user