gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: address@hidden
Subject: [PATCH] Server name indication encoding fails if multiple server names are given
Date: Mon, 7 Jan 2008 14:11:59 +0000 (UTC)

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=0b7c039057a03d3259b296808114adcc2c492f62

I have also attached a patch file.

Cheers
Mark Phillips

Attachment: gnutls-multiple-server-names.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]