Re: [TLS] What is "completed handshake"?

Ben Smyth <research@bensmyth.com> Tue, 09 August 2022 06:37 UTC

Return-Path: <research@bensmyth.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E6BF6C15A732 for <tls@ietfa.amsl.com>; Mon, 8 Aug 2022 23:37:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bensmyth.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SN92_MQ8_wxQ for <tls@ietfa.amsl.com>; Mon, 8 Aug 2022 23:36:58 -0700 (PDT)
Received: from 5.smtp.34sp.com (5.smtp.34sp.com [IPv6:2a00:1ee0:2:5::2eb7:8e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BE686C1594A9 for <tls@ietf.org>; Mon, 8 Aug 2022 23:36:56 -0700 (PDT)
Received: from smtpauth2.mailarray.34sp.com (lvs5.34sp.com [46.183.13.73]) by 5.smtp.34sp.com (Postfix) with ESMTPS id C13F02CBEDA for <tls@ietf.org>; Tue, 9 Aug 2022 07:36:47 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bensmyth.com; s=dkim; t=1660027007; bh=PUMQFMGZvRgbbhdVGDoxqjWz+TryIy9S/m7TH7t+Leo=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To; b=SyZNfIZSbVyJ0tmLBoYhAi+BFEL+BsEvEr0o7tmTcAJFAdMnLClpU4/ADBVI9PTlb 105hKehVOp0Kll15wh9S1BhVch4ABQ2IcoT60eCMFJ5bthEG1Qx4gshG3pVgLym7AF QZnb/voRBlhIRv8JXYF/hRBxYZ54lP9gI1nKQvy0=
Received: from mail-pg1-f182.google.com ([209.85.215.182]:41388) by smtpauth2.mailarray.34sp.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from <research@bensmyth.com>) id 1oLIr8-0004Sn-VM for tls@ietf.org; Tue, 09 Aug 2022 07:36:47 +0100
Received: by mail-pg1-f182.google.com with SMTP id r69so4032106pgr.2 for <tls@ietf.org>; Mon, 08 Aug 2022 23:36:46 -0700 (PDT)
X-Gm-Message-State: ACgBeo1j8yeoj+TkxRjz1gJ8mEvYw+4B9chgWAsN5xc9/5K/2Xbu8j3t fH58y0RE7mCJBXy18vNui/A57zDaCbo7Xv6PPVo=
X-Google-Smtp-Source: AA6agR7OqFKe8MXyNCm7I4Kwla3oQQ6GnNo09LH/r2/6t6WgEmp/OSlS2BcwkpQwqYu4SH4DPw8rF5OWBS1JaUsPh7o=
X-Received: by 2002:aa7:87d8:0:b0:52e:ba7a:7fc0 with SMTP id i24-20020aa787d8000000b0052eba7a7fc0mr17991307pfo.46.1660027005172; Mon, 08 Aug 2022 23:36:45 -0700 (PDT)
MIME-Version: 1.0
References: <CADqLbz+EJAWpAF0bBZn7DOmPwT7ZkfvNsj+uPxP3qenG26fWhQ@mail.gmail.com> <CALZ3u+aJE-ha2YFQ62fNaZUQy6yUbABAt+uBgW8h47fgkp_tiQ@mail.gmail.com>
In-Reply-To: <CALZ3u+aJE-ha2YFQ62fNaZUQy6yUbABAt+uBgW8h47fgkp_tiQ@mail.gmail.com>
Reply-To: research@bensmyth.com
From: Ben Smyth <research@bensmyth.com>
Date: Tue, 09 Aug 2022 08:36:08 +0200
X-Gmail-Original-Message-ID: <CA+_8xu2z7jNZt3EVb71b5usU13ggXHBoGbNvVL+S9xkBqiUpMA@mail.gmail.com>
Message-ID: <CA+_8xu2z7jNZt3EVb71b5usU13ggXHBoGbNvVL+S9xkBqiUpMA@mail.gmail.com>
To: TLS Mailing List <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000f603ff05e5c9272c"
X-Authenticated-As: f594447444afb5e8e542d6cd3ee989c5ad593da02deb40a8d61181d2a2c508bd
X-OriginalSMTPIP: 209.85.215.182
X-34spcom-MailScanner-Information: Please contact the ISP for more information
X-34spcom-MailScanner-ID: C13F02CBEDA.A4399
X-34spcom-MailScanner: Found to be clean
X-34spcom-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.11, required 6.5, autolearn=disabled, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, HTML_MESSAGE 0.00, SPF_PASS -0.00, T_SCC_BODY_TEXT_LINE -0.01)
X-34spcom-MailScanner-From: research@bensmyth.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/uDtjcibYDH4XudK-p0lEHxzyBTw>
Subject: Re: [TLS] What is "completed handshake"?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Aug 2022 06:37:03 -0000

On Mon, Aug 8, 2022 at 4:19 PM Dmitry Belyavsky wrote:
> RFC 8446 refers to "completed handshake" as a prerequisite for some
messages. But looking for the word "completed", I don't see any definition.

On Mon, 8 Aug 2022 at 15:21, Töma Gavrichenkov wrote:
> "Upon receiving the server's messages, the client responds with its
Authentication messages, namely Certificate and CertificateVerify (if
requested), and Finished. At this point, the handshake is complete"

I stumbled with this.

OpenJDK reports handshake completion twice [1,2]. Anthony Scarpino
explains: "SSLEngine with post handshake messages returns
HandshakeStatus.FINISHED [more than once]...Before TLS 1.3 and
PostHandshake messages, the usage for FINISHED was clearly only during the
handshake process and more tied to the [TLS] Finished message [Since TLS
1.3,] KeyUpdate and NewSessionTicket call finishPostHandshake() which sets
the handshake status" [3].

The specification would benefit from some extra clarification.

[1] https://mail.openjdk.org/pipermail/security-dev/2022-May/030784.html
[2] https://mail.openjdk.org/pipermail/security-dev/2022-June/031019.html
[3] https://mail.openjdk.org/pipermail/security-dev/2022-June/031044.html