[openssl/openssl] 6d6b29: Fix SSL_pending() and SSL_has_pending() with DTLS

Matt Caswell noreply at github.com
Mon Aug 1 07:10:11 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 6d6b295ac39fcb0461f25fda69983d2dbb75f8f1
      https://github.com/openssl/openssl/commit/6d6b295ac39fcb0461f25fda69983d2dbb75f8f1
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M ssl/record/rec_layer_s3.c
    M ssl/ssl_lib.c

  Log Message:
  -----------
  Fix SSL_pending() and SSL_has_pending() with DTLS

If app data is received before a Finished message in DTLS then we buffer
it to return later. The function SSL_pending() is supposed to tell you
how much processed app data we have already buffered, and SSL_has_pending()
is supposed to tell you if we have any data buffered (whether processed or
not, and whether app data or not).

Neither SSL_pending() or SSL_has_pending() were taking account of this
DTLS specific app data buffer.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18868)


  Commit: 4000827fdbf3f6d70949186fdd2bc57638500885
      https://github.com/openssl/openssl/commit/4000827fdbf3f6d70949186fdd2bc57638500885
  Author: Matt Caswell <matt at openssl.org>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M test/dtlstest.c
    M test/helpers/ssltestlib.c
    M test/helpers/ssltestlib.h

  Log Message:
  -----------
  Test that swapping the first app data record with Finished msg works

If the first app data record arrives before the Finished message we should
be able to buffer it and move on to the Finished message.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18868)


Compare: https://github.com/openssl/openssl/compare/0113ec8460a9...4000827fdbf3


More information about the openssl-commits mailing list