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/handshake_client.c b/ssl/handshake_client.c
index fc4318e..5fe706c 100644
--- a/ssl/handshake_client.c
+++ b/ssl/handshake_client.c
@@ -502,10 +502,9 @@
break;
case SSL_ST_OK:
- /* clean a few things up */
+ /* Clean a few things up. */
ssl3_cleanup_key_block(ssl);
-
- ssl->method->finish_handshake(ssl);
+ ssl->method->release_current_message(ssl, 1 /* free_buffer */);
/* Remove write buffering now. */
ssl_free_wbio_buffer(ssl);