gnutls-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Server name indication encoding fails if multiple server nam


From: Simon Josefsson
Subject: Re: [PATCH] Server name indication encoding fails if multiple server names are given
Date: Mon, 07 Jan 2008 22:15:53 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

"address@hidden" <address@hidden> writes:

> 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

Many thanks for a good bug report and suggested patch.  I have installed
the patch.

/Simon

> diff -u lib/ext_server_name.c.orig lib/ext_server_name.c
> --- lib/ext_server_name.c.orig  2008-01-07 14:09:56.574035900 +0000
> +++ lib/ext_server_name.c       2008-01-07 14:10:20.106942500 +0000
> @@ -196,7 +196,7 @@
>  
>               memcpy (p,
>                       session->security_parameters.extensions.
> -                     server_names[0].name, len);
> +                     server_names[i].name, len);
>               p += len;
>               break;
>             default:
>
> _______________________________________________
> Gnutls-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnutls-devel




reply via email to

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