Commit 1c7f51ac authored by jan.koester's avatar jan.koester
Browse files

test

parent 4ca7875b
Loading
Loading
Loading
Loading
+323 −45

File changed.

Preview size limit exceeded, changes collapsed.

+4 −2
Changes for src/socket.h: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -898,13 +898,14 @@ namespace netplus {
		std::vector<uint8_t> protectPacket(const std::vector<uint8_t>& header,
		                                   const std::vector<uint8_t>& payload,
		                                   uint64_t packet_number,
		                                   const uint8_t* key, const uint8_t* iv);
		                                   const uint8_t* key, const uint8_t* iv,
		                                   bool force_aes128 = false);
		bool unprotectPacket(const uint8_t* data, size_t len,
		                     std::vector<uint8_t>& header,
		                     std::vector<uint8_t>& payload,
		                     uint64_t& packet_number,
		                     const uint8_t* key, const uint8_t* iv,
		                     const uint8_t* hp_key);
		                     const uint8_t* hp_key, bool force_aes128 = false);

		// Header protection
		void applyHeaderProtection(std::vector<uint8_t>& packet, const uint8_t* hp_key);
@@ -951,6 +952,7 @@ namespace netplus {

		// SNI (Server Name Indication)
		std::string _requested_hostname;
		std::string _selected_alpn;  // ALPN protocol selected (e.g., "h3")
		
		// Selected cipher suite (0x1301 = TLS_AES_128_GCM_SHA256, 0x1302 = TLS_AES_256_GCM_SHA384)
		uint16_t _selected_cipher = 0x1301;  // Default to AES-128-GCM