|
@@ -869,6 +869,11 @@ static int tls_send_client_hello ( struct tls_session *tls ) {
|
869
|
869
|
uint8_t name[ strlen ( tls->name ) ];
|
870
|
870
|
} __attribute__ (( packed )) list[1];
|
871
|
871
|
} __attribute__ (( packed )) server_name;
|
|
872
|
+ uint16_t max_fragment_length_type;
|
|
873
|
+ uint16_t max_fragment_length_len;
|
|
874
|
+ struct {
|
|
875
|
+ uint8_t max;
|
|
876
|
+ } __attribute__ (( packed )) max_fragment_length;
|
872
|
877
|
} __attribute__ (( packed )) extensions;
|
873
|
878
|
} __attribute__ (( packed )) hello;
|
874
|
879
|
unsigned int i;
|
|
@@ -894,6 +899,12 @@ static int tls_send_client_hello ( struct tls_session *tls ) {
|
894
|
899
|
= htons ( sizeof ( hello.extensions.server_name.list[0].name ));
|
895
|
900
|
memcpy ( hello.extensions.server_name.list[0].name, tls->name,
|
896
|
901
|
sizeof ( hello.extensions.server_name.list[0].name ) );
|
|
902
|
+ hello.extensions.max_fragment_length_type
|
|
903
|
+ = htons ( TLS_MAX_FRAGMENT_LENGTH );
|
|
904
|
+ hello.extensions.max_fragment_length_len
|
|
905
|
+ = htons ( sizeof ( hello.extensions.max_fragment_length ) );
|
|
906
|
+ hello.extensions.max_fragment_length.max
|
|
907
|
+ = TLS_MAX_FRAGMENT_LENGTH_2048;
|
897
|
908
|
|
898
|
909
|
return tls_send_handshake ( tls, &hello, sizeof ( hello ) );
|
899
|
910
|
}
|