Re: [TLS] permitted client behaviour when rejecting renegotiation

Nikos Mavrogiannopoulos <> Wed, 20 January 2010 17:43 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 681673A6932 for <>; Wed, 20 Jan 2010 09:43:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 2mkHtUgKvZPv for <>; Wed, 20 Jan 2010 09:43:29 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 42F083A6895 for <>; Wed, 20 Jan 2010 09:43:29 -0800 (PST)
Received: by ewy1 with SMTP id 1so3239496ewy.28 for <>; Wed, 20 Jan 2010 09:43:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=hdYn6srQxPLj8pwPMeVgEXdZT+SMrg0z5nq1OVCIbhM=; b=N87C4hx5C8gJfb/vmnXFTzPlZqyQeFvv1ZdM2bapKkBvqL9zHxLduSe3FrMh8qKQpV qRNillW6p7SzXpTMB8jHTRnlb2t+nVwJbZkF1cWFaSTo6tRTB1aMZqAI3KK0mAZHjtFj si6d6g3mWwD1UDu+H0OrSnGqMuvIJYZanpDNg=
DomainKey-Signature: a=rsa-sha1; c=nofws;; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=WuPg/2ZO4nSu2QAbup4UdMK7dGvwFk5b6+neGdEIeCs9Yf2lFswqzHe+/g36GLSA/q HDWx0Z9ufSg/zTSl4k6Xkx23aH1K/honK1lRSUjGaJfd0qkeNyWgNeCZs8Ru/56Umlm9 jgEhcVhDp1Kg1JTI8eEngNqVGkyc2zIiEYkjY=
Received: by with SMTP id h11mr1141894ebe.0.1264009401999; Wed, 20 Jan 2010 09:43:21 -0800 (PST)
Received: from ? ( []) by with ESMTPS id 16sm90973ewy.2.2010. (version=SSLv3 cipher=RC4-MD5); Wed, 20 Jan 2010 09:43:20 -0800 (PST)
Sender: Nikos Mavrogiannopoulos <>
Message-ID: <>
Date: Wed, 20 Jan 2010 18:43:19 +0100
From: Nikos Mavrogiannopoulos <>
User-Agent: Thunderbird (X11/20090817)
MIME-Version: 1.0
References: <>
In-Reply-To: <>
X-Enigmail-Version: 0.95.7
OpenPGP: id=96865171
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [TLS] permitted client behaviour when rejecting renegotiation
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 20 Jan 2010 17:43:30 -0000

Martin Rex wrote:

>> I always wondered how this behavior was supposed to work. For gnutls an
>> error is returned if the request is ignored.  I think the use cases of
>> these packets for renegotiation should be clearly defined (i.e. why send
>> this packets and what should be expected from peer). I don't know how
>> easy it is to implement the semantics precisely, but so far I didn't see
>> any compelling reason to do so.
> To me, this sounds like the server's gnuTLS switches to half-duplex
> communication when it _sends_ a HelloRequest and expects the next
> _received_ TLS record to carry a ClientHello handshake message
> (or a warning-level no_renegotiation alert).
> Can you describe/confirm the exact behaviour for gnuTLS?

Indeed, and this is intentional. I decided to error on any received
application data, because the only use case of renegotiation I had so
far seen was the client authentication upgrade. In that case I had no
easy way to distinguish data received on the previous session and
"client authenticated" data received on the session after renegotiation.

> From its design, the TLS protocol is full-duplex, so such behaviour
> would not be compliant to any existing SSL/TLS protocol spec.
> The full-duplex requirement, which is implied by the definition
> of the HelloRequest message in SSLv3 already is probably the reason
> why the "may ignore" was written out for TLS:
>    The hello request message may be sent by the server at any time,
>    but will be ignored by the client if the handshake protocol is
>    already underway.  It is a simple notification that the client
>    should begin the negotiation process anew by sending a client hello
>    message when convenient.

Then you have the issue to distinguish data on the session "before" and
the session "after" which is doable but not trivial (and probably
depends on the application layer to interpret this information as well).

> That "when convenient" accounts to the fact that the (app) client
> may be writing and the TLS implementation therefore not even
> looking (read) whether there might be a HelloRequest handshake
> message waiting -- and continue sending application data.

My limited experience with renegotiation shows that it is used in
coordination with the application layer to upgrade the session with new
security parameters. This is typically done on a silent phase of the
application protocol (not during a file transfer that would require full
duplex communication). Thus my decision was to implement this use case
of renegotiation and wait for some compelling reasons (use cases) to
implement the rest, which as I mentioned is not trivial.

best regards,