--- Begin Message ---
Subject: |
Bug#188838: libgnutls5: Server name indication does not appear to work |
Date: |
Sun, 13 Apr 2003 15:46:12 +0200 |
User-agent: |
Wanderlust/2.10.0 (Venus) Emacs/21.2 Mule/5.0 (SAKAKI) |
tag 188838 + patch
thanks
I narrowed down the problem to _gnutls_server_recv_params(). It
appears to decrement data_size too early. If I move the decremention
after the len == data_size comparsion, things magically start to work.
On the other hand, the bug may lie in _gnutls_server_send_params()
too.. Since I do not know the protocol, I'd rather not jump into
conclusions.
However, nothing appears to break, so I'm including a patch anyways :)
diff -u -ur gnutls5-0.8.6/lib/ext_server_name.c
gnutls5-work/lib/ext_server_name.c
--- gnutls5-0.8.6/lib/ext_server_name.c 2003-01-20 17:46:07.000000000 +0100
+++ gnutls5-work/lib/ext_server_name.c 2003-04-13 15:37:03.000000000 +0200
@@ -44,7 +44,6 @@
int server_names = 0;
if (session->security_parameters.entity == GNUTLS_SERVER) {
- DECR_LENGTH_RET(data_size, 2, 0);
len = _gnutls_read_uint16(data);
if ( len != data_size) {
@@ -54,7 +53,9 @@
gnutls_assert();
return 0;
}
-
+
+ DECR_LENGTH_RET(data_size, 2, 0);
+
p = data + 2;
/* Count all server_names in the packet. */
--- End Message ---