Skip to content

Commit

Permalink
Merge pull request #1202 from wangfakang/some_fix
Browse files Browse the repository at this point in the history
Add NGX_SSL_ASYNC macro for ssl_async and repair some fix.
  • Loading branch information
chobits authored Mar 7, 2019
2 parents bd7d4c7 + 50a1ca8 commit dd6937d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/core/ngx_conf_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ struct ngx_conf_s {

ngx_conf_handler_pt handler;
void *handler_conf;
#if (NGX_SSL && NGX_SSL_ASYNC)
ngx_flag_t no_ssl_init;
#endif
};


Expand Down
13 changes: 6 additions & 7 deletions src/event/ngx_event_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2982,13 +2982,6 @@ ngx_ssl_free_buffer(ngx_connection_t *c)
c->ssl->buf->start = NULL;
}
}
#if !defined(OPENSSL_IS_BORINGSSL) && (OPENSSL_VERSION_NUMBER >= 0x10101000L)
if (c->ssl->early_buf && c->ssl->early_buf->start) {
if (ngx_pfree(c->pool, c->ssl->early_buf->start) == NGX_OK) {
c->ssl->early_buf->start = NULL;
}
}
#endif
}


Expand Down Expand Up @@ -5530,6 +5523,12 @@ ngx_openssl_engine(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return "is duplicate";
}

#if (NGX_SSL && NGX_SSL_ASYNC)
if (cf->no_ssl_init) {
return NGX_CONF_OK;
}
#endif

oscf->engine = 1;

value = cf->args->elts;
Expand Down

0 comments on commit dd6937d

Please sign in to comment.