[PATCH] Server name indication encoding fails if multiple server names are given

mark.phillips at virgin.net mark.phillips at virgin.net
Mon Jan 7 15:11:59 CET 2008


The code in lib/ext_server_name.c _gnutls_server_name_send_params() fails when more than one server name is specified (via the gnutls_server_name_set API).The loop in _gnutls_server_name_send_params uses a hardcoded index of "0" (instead of "i") to retrieve the server name which is copied into the ClientHello message, this means that the second server name will be incorrect.The fix is trivial - simply change the [0] to [i] in the following line:-	      memcpy (p,		      session->security_parameters.extensions.		      server_names[0].name, len);This is line 199 of the latest version of the file - http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=blob;f=lib/ext_server_name.c;hb=0b7c039057a03d3259b296808114adcc2c492f62I have also attached a patch file.CheersMark Phillips
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20080107/538a7f14/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnutls-multiple-server-names.patch
Type: application/octet-stream
Size: 469 bytes
Desc: not available
URL: </pipermail/attachments/20080107/538a7f14/attachment.obj>


More information about the Gnutls-devel mailing list