Hand back in-progress handshakes after a session resumption.
And since there are now 3 different points in the state machine where
a handback can occur, introduce an enum to describe them.
Change-Id: I41866214c39d27d1bbd965d28eb122c0e1f9902a
Reviewed-on: https://boringssl-review.googlesource.com/28344
Commit-Queue: Matt Braithwaite <mab@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/handshake_server.cc b/ssl/handshake_server.cc
index 3c06b33..02657f3 100644
--- a/ssl/handshake_server.cc
+++ b/ssl/handshake_server.cc
@@ -1363,6 +1363,9 @@
}
static enum ssl_hs_wait_t do_read_change_cipher_spec(SSL_HANDSHAKE *hs) {
+ if (hs->handback && hs->ssl->session != NULL) {
+ return ssl_hs_handback;
+ }
hs->state = state12_process_change_cipher_spec;
return ssl_hs_read_change_cipher_spec;
}