Fix fallback to passthrough when no cert present

Properly reset connection state when reconnecting the dst part of the
connection.  This fixes the fallback to passthrough when no certficates
are present which can be used to split the SSL.

Issue:          #9
Reported by:    ceear
pull/13/head
Daniel Roethlisberger 11 years ago
parent ac9a2613e0
commit 2a4a9c8b23

@ -1276,8 +1276,10 @@ pxy_bev_eventcb(struct bufferevent *bev, short events, void *arg)
ctx->src.ssl = pxy_srcssl_create(ctx, this->ssl);
if (!ctx->src.ssl) {
bufferevent_free_and_close_fd(bev, ctx);
ctx->dst.ssl = NULL;
if (ctx->opts->passthrough && !ctx->enomem) {
ctx->passthrough = 1;
ctx->connected = 0;
log_dbg_printf("No cert found; "
"falling back "
"to passthrough\n");

Loading…
Cancel
Save