From 3dfe680a7671234d05225b23591148dfeafbfa7b Mon Sep 17 00:00:00 2001 From: luqiuwen Date: Tue, 21 May 2019 17:15:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BD=93ssl=E5=9C=A8?= =?UTF-8?q?=E4=BB=A5peek=E6=96=B9=E5=BC=8F=E8=A7=A3=E6=9E=90clienthello?= =?UTF-8?q?=E5=B9=B6=E8=BF=94=E5=9B=9Enot=5Fenough=5Fbuff=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E4=BC=A0=E5=85=A5ev=5Fbase=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E8=BF=9E=E6=8E=A5=E5=BB=BA=E7=AB=8B=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/ssl_stream.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/src/ssl_stream.cpp b/platform/src/ssl_stream.cpp index 1c99d89..b4446c2 100644 --- a/platform/src/ssl_stream.cpp +++ b/platform/src/ssl_stream.cpp @@ -764,7 +764,7 @@ static void peek_client_hello_cb(evutil_socket_t fd, short what, void * arg) peek_client_hello_ctx_free(ctx); break; } - case CHELLO_PARSE_NOT_ENOUGH_BUFF: + case CHELLO_PARSE_NOT_ENOUGH_BUFF: { ssl_chello_free(chello); chello=NULL; @@ -819,6 +819,8 @@ static void ssl_async_peek_client_hello(struct future * f, evutil_socket_t fd, s struct promise * p = future_to_promise(f); struct peek_client_hello_ctx * ctx = ALLOC(struct peek_client_hello_ctx, 1); ctx->ev = event_new(evbase, fd, EV_READ, peek_client_hello_cb, p); + ctx->evbase = evbase; + ctx->parse_client_cipher=parse_cipher; ctx->logger = logger; promise_set_ctx(p, (void *) ctx, peek_client_hello_ctx_free_cb); event_add(ctx->ev, NULL);