Tweak ssl_early_callback_init. It really should take a few more parameters and save a bit of long-winded initialization work. Change-Id: I2823f0aa82be39914a156323f6f32b470b6d6a3b Reviewed-on: https://boringssl-review.googlesource.com/8876 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@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/t1_lib.c b/ssl/t1_lib.c index 7549240..b1e3b13 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c
@@ -202,9 +202,14 @@ return ret; } -char ssl_early_callback_init(struct ssl_early_callback_ctx *ctx) { - CBS client_hello, session_id, cipher_suites, compression_methods, extensions; +int ssl_early_callback_init(SSL *ssl, struct ssl_early_callback_ctx *ctx, + const uint8_t *in, size_t in_len) { + memset(ctx, 0, sizeof(*ctx)); + ctx->ssl = ssl; + ctx->client_hello = in; + ctx->client_hello_len = in_len; + CBS client_hello, session_id, cipher_suites, compression_methods, extensions; CBS_init(&client_hello, ctx->client_hello, ctx->client_hello_len); if (/* Skip client version. */