Request contexts are now illegal during the handshake.
One less thing to keep track of.
https://github.com/tlswg/tls13-spec/pull/549 got merged.
Change-Id: Ide66e547140f8122a3b8013281be5215c11b6de0
Reviewed-on: https://boringssl-review.googlesource.com/10482
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/tls13_both.c b/ssl/tls13_both.c
index 2527896..9dd27ce 100644
--- a/ssl/tls13_both.c
+++ b/ssl/tls13_both.c
@@ -63,7 +63,6 @@
ssl_handshake_clear_groups(hs);
OPENSSL_free(hs->key_share_bytes);
OPENSSL_free(hs->public_key);
- OPENSSL_free(hs->cert_context);
OPENSSL_free(hs);
}
@@ -329,11 +328,10 @@
}
int tls13_prepare_certificate(SSL *ssl) {
- CBB cbb, body, context;
+ CBB cbb, body;
if (!ssl->method->init_message(ssl, &cbb, &body, SSL3_MT_CERTIFICATE) ||
- !CBB_add_u8_length_prefixed(&body, &context) ||
- !CBB_add_bytes(&context, ssl->s3->hs->cert_context,
- ssl->s3->hs->cert_context_len) ||
+ /* The request context is always empty in the handshake. */
+ !CBB_add_u8(&body, 0) ||
!ssl_add_cert_chain(ssl, &body) ||
!ssl->method->finish_message(ssl, &cbb)) {
CBB_cleanup(&cbb);