- Fixed etcp_encrypt_send function to properly handle encryption with timestamps - Corrected packet parsing in etcp_connections_read_callback - Fixed INIT_RESPONSE packet handling and connection establishment - Added proper error handling for crypto operations - Removed debug file etcp_connections.c3 - Updated secure_channel.c with better error logging - Fixed peer public key validation and setting - Improved connection state tracking and initialization
11 lines
427 B
Diff
11 lines
427 B
Diff
--- etcp_connections.c.backup
|
|
+++ etcp_connections.c
|
|
@@ -409,6 +409,7 @@
|
|
uint8_t enc_buf[1600];
|
|
size_t enc_buf_len;
|
|
dgram->timestamp=get_current_timestamp();
|
|
+ printf("[ETCP DEBUG] About to encrypt: data_len=%d, noencrypt_len=%d, len=%d\\n", dgram->data_len, dgram->noencrypt_len, len);
|
|
|
|
// DUMP: Show packet before encryption
|
|
dump_packet_bytes("BEFORE ENCRYPT", dgram->data, dgram->data_len);
|