Switch finish_handshake to release_current_message.
With the previous DTLS change, the dispatch layer only cares about the
end of the handshake to know when to drop the current message. TLS 1.3
post-handshake messages will need a similar hook, so convert it to this
lower-level one.
BUG=83
Change-Id: I4c8c3ba55ba793afa065bf261a7bccac8816c348
Reviewed-on: https://boringssl-review.googlesource.com/8989
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/dtls_method.c b/ssl/dtls_method.c
index 09bd455..e2e1726 100644
--- a/ssl/dtls_method.c
+++ b/ssl/dtls_method.c
@@ -92,12 +92,6 @@
return ~(version - 0x0201);
}
-static void dtls1_finish_handshake(SSL *ssl) {
- dtls_clear_incoming_messages(ssl);
- ssl->init_msg = NULL;
- ssl->init_num = 0;
-}
-
static int dtls1_set_read_state(SSL *ssl, SSL_AEAD_CTX *aead_ctx) {
/* Cipher changes are illegal when there are buffered incoming messages. */
if (dtls_has_incoming_messages(ssl)) {
@@ -135,9 +129,9 @@
dtls1_version_to_wire,
dtls1_new,
dtls1_free,
- dtls1_finish_handshake,
dtls1_get_message,
dtls1_hash_current_message,
+ dtls1_release_current_message,
dtls1_read_app_data,
dtls1_read_change_cipher_spec,
dtls1_read_close_notify,