proxy_ssl_session_reuse on;发现没有生效,怎么解决呢

148 views
Skip to first unread message

along

unread,
Oct 28, 2019, 11:28:08 PM10/28/19
to openresty
配置文件是 

proxy_pass https://$upstream_ip;
proxy_ssl_session_reuse on;

$upstream_ip变量,在lua里面设置成为一个域名;

通过抓包发现每次都会重新进行ssl握手,并没有重用;


通过看源码发现最终调用peer.set_session和peer.save_session分别是 ngx_http_upstream_empty_set_session 和 ngx_http_upstream_empty_save_session ,这两个函数什么不做直接退出了;

设置这两个handler的地方是 ngx_http_upstream_create_round_robin ;大致的调用过程是 ngx_http_upstream_init -> ngx_http_upstream_init_request -> ngx_http_upstream_resolve_handler -> ngx_http_upstream_create_round_robin;


有没有什么办法在这种情况下使得ssl_session_reuse生效呢?

along

unread,
Oct 31, 2019, 10:48:30 PM10/31/19
to openresty
有没有比较了解的同学,帮忙看看呗?

顺便再问一个问题 proxy_ssl_trusted_certificate这个配置项,如果server的证书都是公网证书的话是不是就没必要配置呢?
Reply all
Reply to author
Forward
0 new messages